postgres "forgets" table definitions

postgres "forgets" table definitions

am 10.06.2008 13:12:32 von Alex

Hi,

We're running pgsql 7.3.14 (yes I know it's old, an upgrade to 8.3 is planned).
Since a couple of weeks postgres loses the table definitions from apparently random tables. A 'broken' table actually still works but a \d table gives nothing. Currently The biggest problem is that these broken tables don't appear in the backups.

example:
mydb=# select * from toegevoegde_dienst_omzetting_history limit 1;
omzetting_id | toegevoegde_dienst_id | datum_aanvraag | datum_ingang | datum_uitgevoerd | product_soort_id_oud | product_soort_id_nieuw | id | door_wie | sinds
--------------+-----------------------+----------------+---- ----------+------------------+----------------------+------- -----------------+----+------------+---------------------
5 | 167817 | 2007-12-23 | 2007-12-23 | | 5816 | 5817 | 6 | webservice | 2007-12-23 19:55:36
(1 row)

mydb=# \d toegevoegde_dienst_omzetting_history
Did not find any relation named "toegevoegde_dienst_omzetting_history".
mydb=#

And this table is obviously from the pg_catalog.pg_class table as well.

Has anyone any idea what may cause this? I can't find anything in the logs regarding the missing tables. (eg. that someone messes the pg_catalog tables). I disabled the nightly vacuum process but the problem persists.

Could this problem be fixed by inserting the right records back in to in de pg_catalog tables? is there a way to dump the pg_catalog tables?

The pgserver is running on a 4 CPU dell 6850 with 16G of Ram with Fedora Core 4 on a reiserfs filesystem without any problems for years. And nothing has changed on the server side of things.

thanks,
alex.


--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: postgres "forgets" table definitions

am 10.06.2008 15:59:07 von Alex

Problem solved!

After a vacuum full verbose analyze of all the pg_* tables everything is fine again.

I switched to a scripted vacuum about 6 months ago because some (history)tables take way too long to vacuum and have static data anyway. But as it turns out I skipped all the pg_ tables since then. So they were not vacuumed for quite some time.

Even without vacuuming, I don't think postgres should ever behave like this, but I'm glad my problem is solved now.

(perhaps this issue is fixed in newer releases, if not someone might want to look in to this pg_* tables/vacuum issue)

alex.





-------- Original Message --------
Subject: [ADMIN] postgres 'forgets' table definitions
From: alex
To: pgsql-admin@postgresql.org
Date: Tue Jun 10 2008 13:12:32 GMT+0200

> Hi,
>
> We're running pgsql 7.3.14 (yes I know it's old, an upgrade to 8.3 is planned).
> Since a couple of weeks postgres loses the table definitions from apparently random tables. A 'broken' table actually still works but a \d table gives nothing. Currently The biggest problem is that these broken tables don't appear in the backups.
>
> example:
> mydb=# select * from toegevoegde_dienst_omzetting_history limit 1;
> omzetting_id | toegevoegde_dienst_id | datum_aanvraag | datum_ingang | datum_uitgevoerd | product_soort_id_oud | product_soort_id_nieuw | id | door_wie | sinds
> --------------+-----------------------+----------------+---- ----------+------------------+----------------------+------- -----------------+----+------------+---------------------
> 5 | 167817 | 2007-12-23 | 2007-12-23 | | 5816 | 5817 | 6 | webservice | 2007-12-23 19:55:36
> (1 row)
>
> mydb=# \d toegevoegde_dienst_omzetting_history
> Did not find any relation named "toegevoegde_dienst_omzetting_history".
> mydb=#
>
> And this table is obviously from the pg_catalog.pg_class table as well.
>
> Has anyone any idea what may cause this? I can't find anything in the logs regarding the missing tables. (eg. that someone messes the pg_catalog tables). I disabled the nightly vacuum process but the problem persists.
>
> Could this problem be fixed by inserting the right records back in to in de pg_catalog tables? is there a way to dump the pg_catalog tables?
>
> The pgserver is running on a 4 CPU dell 6850 with 16G of Ram with Fedora Core 4 on a reiserfs filesystem without any problems for years. And nothing has changed on the server side of things.
>
> thanks,
> alex.
>
>

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: postgres "forgets" table definitions

am 10.06.2008 17:19:32 von Jaime Casanova

On Tue, Jun 10, 2008 at 8:59 AM, alex wrote:
> Problem solved!
>
> After a vacuum full verbose analyze of all the pg_* tables everything is =
fine again.
>
> I switched to a scripted vacuum about 6 months ago because some (history)=
tables take way too long to vacuum and have static data anyway. But as it t=
urns out I skipped all the pg_ tables since then. So they were not vacuumed=
for quite some time.
>
> Even without vacuuming, I don't think postgres should ever behave like th=
is, but I'm glad my problem is solved now.
>

vacuum is a need not a choice, specially with such an old version...
http://www.postgresql.org/docs/7.3/static/routine-vacuuming. html#VACUUM-FOR=
-WRAPAROUND

in 8.3, there are a couple of improvments in that area that makes
wraparound less frecuent but it is still a problem... and now the
autovacuum is integrated so things are a lot better

--=20
regards,
Jaime Casanova
Soporte y capacitaci=F3n de PostgreSQL
Guayaquil - Ecuador
Cel. (593) 87171157

--=20
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: postgres "forgets" table definitions

am 10.06.2008 17:52:29 von Scott Marlowe

On Tue, Jun 10, 2008 at 7:59 AM, alex wrote:
> Problem solved!
>
> Even without vacuuming, I don't think postgres should ever behave like this, but I'm glad my problem is solved now.
>
> (perhaps this issue is fixed in newer releases, if not someone might want to look in to this pg_* tables/vacuum issue)

As Jaime mentioned already, vacuuming is required. However, in
addition to his point about various improvements, newer version will
begin throwing errors as they get closer to txid wraparound, and will
eventually shut down and refuse to run in multi-user mode once it
reaches a certain point.

So, yes, things have improved.

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Disk Space issue

am 11.06.2008 01:36:48 von Devendra Singh Rawat

Hi,

We are using PostgreSQL 7.4.5 and facing issues with increasing disk space.

Here is some information about our configuration.

The data dump size is around 3 GB. And it is occupying around 120GB on the =
disk. When we recreate the database from data dump it takes around 3.5GB of=
disk space.
But the database size increases by 1 GB daily though actual data added mayb=
e in KB. We are not able to decipher as to what is causing this increase.

Suggestions on the likely problems will be appreciated.

Regards,
Devendra

**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solel=
y=20
for the use of the addressee(s). If you are not the intended recipient, ple=
ase=20
notify the sender by e-mail and delete the original message. Further, you a=
re not=20
to copy, disclose, or distribute this e-mail or its contents to any other p=
erson and=20
any such actions are unlawful. This e-mail may contain viruses. Infosys has=
taken=20
every reasonable precaution to minimize this risk, but is not liable for an=
y damage=20
you may sustain as a result of any virus in this e-mail. You should carry o=
ut your=20
own virus checks before opening the e-mail or attachment. Infosys reserves =
the=20
right to monitor and review the content of all messages sent to or from thi=
s e-mail=20
address. Messages sent to or from this e-mail address may be stored on the=
=20
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

--=20
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: Disk Space issue

am 11.06.2008 01:55:15 von Joshua Drake

On Wed, 2008-06-11 at 09:36 +1000, Devendra Singh Rawat wrote:
> Hi,
>
> We are using PostgreSQL 7.4.5 and facing issues with increasing disk space.
>
> Here is some information about our configuration.
>
> The data dump size is around 3 GB. And it is occupying around 120GB on the disk. When we recreate the database from data dump it takes around 3.5GB of disk space.
> But the database size increases by 1 GB daily though actual data added maybe in KB. We are not able to decipher as to what is causing this increase.
>
> Suggestions on the likely problems will be appreciated.

You are likely not vacuuming nearly enough.

I would also suggest strongly you update to the latest 7.4 dot release.

Joshua D. Drake

>
> Regards,
> Devendra
>
> **************** CAUTION - Disclaimer *****************
> This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
> for the use of the addressee(s). If you are not the intended recipient, please
> notify the sender by e-mail and delete the original message. Further, you are not
> to copy, disclose, or distribute this e-mail or its contents to any other person and
> any such actions are unlawful. This e-mail may contain viruses. Infosys has taken
> every reasonable precaution to minimize this risk, but is not liable for any damage
> you may sustain as a result of any virus in this e-mail. You should carry out your
> own virus checks before opening the e-mail or attachment. Infosys reserves the
> right to monitor and review the content of all messages sent to or from this e-mail
> address. Messages sent to or from this e-mail address may be stored on the
> Infosys e-mail system.
> ***INFOSYS******** End of Disclaimer ********INFOSYS***
>


--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: Disk Space issue

am 11.06.2008 01:58:29 von Devendra Singh Rawat

Hi Joshua,

We used Vacuum Full but were not successful. The reclaimed disk space was o=
nly few MB.
I did not get to which version I need to update my Postgres.

Regards,
Devendra

Devendra Singh Rawat
Infosys Technologies Ltd.
Tel: +61 3 9860 2276 (D)
Fax: +61 3 9860 2501
Email: devendra_rawat@infosys.com
www.infosys.com
Powered by Intellect
Driven by Values


-----Original Message-----
From: Joshua D. Drake [mailto:jd@commandprompt.com]
Sent: Wednesday, 11 June 2008 9:55 AM
To: Devendra Singh Rawat
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Disk Space issue



On Wed, 2008-06-11 at 09:36 +1000, Devendra Singh Rawat wrote:
> Hi,
>
> We are using PostgreSQL 7.4.5 and facing issues with increasing disk spac=
e.
>
> Here is some information about our configuration.
>
> The data dump size is around 3 GB. And it is occupying around 120GB on th=
e disk. When we recreate the database from data dump it takes around 3.5GB =
of disk space.
> But the database size increases by 1 GB daily though actual data added ma=
ybe in KB. We are not able to decipher as to what is causing this increase.
>
> Suggestions on the likely problems will be appreciated.

You are likely not vacuuming nearly enough.

I would also suggest strongly you update to the latest 7.4 dot release.

Joshua D. Drake

>
> Regards,
> Devendra
>
> **************** CAUTION - Disclaimer *****************
> This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended sol=
ely
> for the use of the addressee(s). If you are not the intended recipient, p=
lease
> notify the sender by e-mail and delete the original message. Further, you=
are not
> to copy, disclose, or distribute this e-mail or its contents to any other=
person and
> any such actions are unlawful. This e-mail may contain viruses. Infosys h=
as taken
> every reasonable precaution to minimize this risk, but is not liable for =
any damage
> you may sustain as a result of any virus in this e-mail. You should carry=
out your
> own virus checks before opening the e-mail or attachment. Infosys reserve=
s the
> right to monitor and review the content of all messages sent to or from t=
his e-mail
> address. Messages sent to or from this e-mail address may be stored on the
> Infosys e-mail system.
> ***INFOSYS******** End of Disclaimer ********INFOSYS***
>


--=20
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: Disk Space issue

am 11.06.2008 02:05:30 von Joshua Drake

On Wed, 2008-06-11 at 09:58 +1000, Devendra Singh Rawat wrote:
> Hi Joshua,
>
> We used Vacuum Full but were not successful. The reclaimed disk space was only few MB.
> I did not get to which version I need to update my Postgres.

VACUUM FULL may not reclaim your index space if it bloated out. What you
are best to look at is the type of queries are being run. Determine what
is getting bloated and look at modifying how you maintain that relation.

7.4.19 (which hits soon)

Joshua D. Drake


>
> Regards,
> Devendra
>
> Devendra Singh Rawat
> Infosys Technologies Ltd.
> Tel: +61 3 9860 2276 (D)
> Fax: +61 3 9860 2501
> Email: devendra_rawat@infosys.com
> www.infosys.com
> Powered by Intellect
> Driven by Values
>
>
> -----Original Message-----
> From: Joshua D. Drake [mailto:jd@commandprompt.com]
> Sent: Wednesday, 11 June 2008 9:55 AM
> To: Devendra Singh Rawat
> Cc: pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] Disk Space issue
>
>
>
> On Wed, 2008-06-11 at 09:36 +1000, Devendra Singh Rawat wrote:
> > Hi,
> >
> > We are using PostgreSQL 7.4.5 and facing issues with increasing disk space.
> >
> > Here is some information about our configuration.
> >
> > The data dump size is around 3 GB. And it is occupying around 120GB on the disk. When we recreate the database from data dump it takes around 3.5GB of disk space.
> > But the database size increases by 1 GB daily though actual data added maybe in KB. We are not able to decipher as to what is causing this increase.
> >
> > Suggestions on the likely problems will be appreciated.
>
> You are likely not vacuuming nearly enough.
>
> I would also suggest strongly you update to the latest 7.4 dot release.
>
> Joshua D. Drake
>
> >
> > Regards,
> > Devendra
> >
> > **************** CAUTION - Disclaimer *****************
> > This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
> > for the use of the addressee(s). If you are not the intended recipient, please
> > notify the sender by e-mail and delete the original message. Further, you are not
> > to copy, disclose, or distribute this e-mail or its contents to any other person and
> > any such actions are unlawful. This e-mail may contain viruses. Infosys has taken
> > every reasonable precaution to minimize this risk, but is not liable for any damage
> > you may sustain as a result of any virus in this e-mail. You should carry out your
> > own virus checks before opening the e-mail or attachment. Infosys reserves the
> > right to monitor and review the content of all messages sent to or from this e-mail
> > address. Messages sent to or from this e-mail address may be stored on the
> > Infosys e-mail system.
> > ***INFOSYS******** End of Disclaimer ********INFOSYS***
> >
>
>


--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: Disk Space issue

am 11.06.2008 03:08:14 von Devendra Singh Rawat

We ran the SQL to get the table which are consuming maximum space.
The results are as shown:-
SELECT relname, relpages FROM pg_class ORDER BY relpages DESC;
relname | relpages
--------------------------------------------------+--------- -
| 52869
| 31267
| 15418
| 9693
| 6426


But these only cover around few GB of data.

Regards,
Devendra

-----Original Message-----
From: Joshua D. Drake [mailto:jd@commandprompt.com]
Sent: Wednesday, 11 June 2008 10:06 AM
To: Devendra Singh Rawat
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Disk Space issue



On Wed, 2008-06-11 at 09:58 +1000, Devendra Singh Rawat wrote:
> Hi Joshua,
>
> We used Vacuum Full but were not successful. The reclaimed disk space was=
only few MB.
> I did not get to which version I need to update my Postgres.

VACUUM FULL may not reclaim your index space if it bloated out. What you
are best to look at is the type of queries are being run. Determine what
is getting bloated and look at modifying how you maintain that relation.

7.4.19 (which hits soon)

Joshua D. Drake


>
> Regards,
> Devendra
>
> Devendra Singh Rawat
> Infosys Technologies Ltd.
> Tel: +61 3 9860 2276 (D)
> Fax: +61 3 9860 2501
> Email: devendra_rawat@infosys.com
> www.infosys.com
> Powered by Intellect
> Driven by Values
>
>
> -----Original Message-----
> From: Joshua D. Drake [mailto:jd@commandprompt.com]
> Sent: Wednesday, 11 June 2008 9:55 AM
> To: Devendra Singh Rawat
> Cc: pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] Disk Space issue
>
>
>
> On Wed, 2008-06-11 at 09:36 +1000, Devendra Singh Rawat wrote:
> > Hi,
> >
> > We are using PostgreSQL 7.4.5 and facing issues with increasing disk sp=
ace.
> >
> > Here is some information about our configuration.
> >
> > The data dump size is around 3 GB. And it is occupying around 120GB on =
the disk. When we recreate the database from data dump it takes around 3.5G=
B of disk space.
> > But the database size increases by 1 GB daily though actual data added =
maybe in KB. We are not able to decipher as to what is causing this increas=
e.
> >
> > Suggestions on the likely problems will be appreciated.
>
> You are likely not vacuuming nearly enough.
>
> I would also suggest strongly you update to the latest 7.4 dot release.
>
> Joshua D. Drake
>
> >
> > Regards,
> > Devendra
> >
> > **************** CAUTION - Disclaimer *****************
> > This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended s=
olely
> > for the use of the addressee(s). If you are not the intended recipient,=
please
> > notify the sender by e-mail and delete the original message. Further, y=
ou are not
> > to copy, disclose, or distribute this e-mail or its contents to any oth=
er person and
> > any such actions are unlawful. This e-mail may contain viruses. Infosys=
has taken
> > every reasonable precaution to minimize this risk, but is not liable fo=
r any damage
> > you may sustain as a result of any virus in this e-mail. You should car=
ry out your
> > own virus checks before opening the e-mail or attachment. Infosys reser=
ves the
> > right to monitor and review the content of all messages sent to or from=
this e-mail
> > address. Messages sent to or from this e-mail address may be stored on =
the
> > Infosys e-mail system.
> > ***INFOSYS******** End of Disclaimer ********INFOSYS***
> >
>
>


--=20
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: Disk Space issue

am 11.06.2008 03:28:37 von Tom Lane

Devendra Singh Rawat writes:
> We ran the SQL to get the table which are consuming maximum space.
> The results are as shown:-
> SELECT relname, relpages FROM pg_class ORDER BY relpages DESC;
> relname | relpages
> --------------------------------------------------+--------- -
> | 52869
> | 31267
> | 15418
> | 9693
> | 6426


> But these only cover around few GB of data.

pg_class.relpages is only up-to-date as of the last VACUUM.
There's already good reason to suspect that you're not vacuuming
enough; maybe some big tables are not getting vacuumed at all.

I'd suggest having a look into the data directory to see for yourself
which are the big files. The documentation might help you:
http://www.postgresql.org/docs/8.3/static/storage.html
(IIRC, all of this except the material on tablespaces will apply
to 7.4.)

regards, tom lane

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: Disk Space issue

am 11.06.2008 08:14:44 von praveen.k

Hi,
I think you have a lot DML operation in your database and you are not
vacuuming your database . So try to execute command vacuum analyze
<

>; in your schema where you are facing problem.

-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Devendra Singh
Rawat
Sent: Wednesday, June 11, 2008 5:07 AM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] Disk Space issue

Hi,

We are using PostgreSQL 7.4.5 and facing issues with increasing disk
space.

Here is some information about our configuration.

The data dump size is around 3 GB. And it is occupying around 120GB on
the disk. When we recreate the database from data dump it takes around
3.5GB of disk space.
But the database size increases by 1 GB daily though actual data added
maybe in KB. We are not able to decipher as to what is causing this
increase.

Suggestions on the likely problems will be appreciated.

Regards,
Devendra

**************** CAUTION - Disclaimer ***************** This e-mail
contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the
use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further,
you are not to copy, disclose, or distribute this e-mail or its contents
to any other person and any such actions are unlawful. This e-mail may
contain viruses. Infosys has taken every reasonable precaution to
minimize this risk, but is not liable for any damage you may sustain as
a result of any virus in this e-mail. You should carry out your own
virus checks before opening the e-mail or attachment. Infosys reserves
the right to monitor and review the content of all messages sent to or
from this e-mail address. Messages sent to or from this e-mail address
may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make
changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

--=20
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: Disk Space issue

am 11.06.2008 09:42:45 von Devendra Singh Rawat

Hi All,

I recreated my database this morning with a dump size of 3GB, which after d=
atabase creation occupied 3.5GB on disk.
And in less than 8 hours it has bloated to additional 3.7GB (the disk size =
now is 7.2GB).

There are quite a few DML operations which are happening on my DB.

SELECT relname, relpages FROM pg_class ORDER BY relpages DESC;
relname | relpages
------------------------------------------------------------ -+----------
< table1 > | 180676
< table2 > | 22828
< table3 > | 13469
< table4 > | 9174
< table5 > | 7246
< table6 > | 3865
< table7 > | 2384
< table8 > | 2013
< table9 > | 1836
< table10 > | 1356
< table11 > | 1349
< table12 > | 1025
< table13 > | 910
< table14 > | 896
< table15 > | 797
< table16 > | 708
< table17 > | 665
< table18 > | 601
< table19 > | 407
< table20 > | 374

Regards,
Devendra

-----Original Message-----
From: Praveen Kumar (TUV) [mailto:praveen.k@renaissance-it.com]
Sent: Wednesday, 11 June 2008 4:15 PM
To: Devendra Singh Rawat; pgsql-admin@postgresql.org
Subject: RE: [ADMIN] Disk Space issue

Hi,
I think you have a lot DML operation in your database and you are not
vacuuming your database . So try to execute command vacuum analyze
<

>; in your schema where you are facing problem.

-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Devendra Singh
Rawat
Sent: Wednesday, June 11, 2008 5:07 AM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] Disk Space issue

Hi,

We are using PostgreSQL 7.4.5 and facing issues with increasing disk
space.

Here is some information about our configuration.

The data dump size is around 3 GB. And it is occupying around 120GB on
the disk. When we recreate the database from data dump it takes around
3.5GB of disk space.
But the database size increases by 1 GB daily though actual data added
maybe in KB. We are not able to decipher as to what is causing this
increase.

Suggestions on the likely problems will be appreciated.

Regards,
Devendra

**************** CAUTION - Disclaimer ***************** This e-mail
contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the
use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further,
you are not to copy, disclose, or distribute this e-mail or its contents
to any other person and any such actions are unlawful. This e-mail may
contain viruses. Infosys has taken every reasonable precaution to
minimize this risk, but is not liable for any damage you may sustain as
a result of any virus in this e-mail. You should carry out your own
virus checks before opening the e-mail or attachment. Infosys reserves
the right to monitor and review the content of all messages sent to or
from this e-mail address. Messages sent to or from this e-mail address
may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make
changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

--=20
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: Disk Space issue

am 11.06.2008 09:54:58 von Michael Monnerie

--nextPart2223884.jXlGJtiAGF
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Mittwoch, 11. Juni 2008 Devendra Singh Rawat wrote:
> And in less than 8 hours it has bloated to additional 3.7GB (the disk
> size now is 7.2GB).
>
> There are quite a few DML operations which are happening on my DB.
>
> SELECT relname, relpages FROM pg_class ORDER BY relpages DESC;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0relname =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| relpages
> ------------------------------------------------------------ -+-------
>--- < =A0 table1 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
| =A0 180676

And after VACUUM FULL, is it small again? Maybe you need to run it 2-3=20
times a day, for your specific workload.

mfg zmi
=2D-=20
// Michael Monnerie, Ing.BSc ----- http://it-management.at
// Tel: 0660 / 415 65 31 .network.your.ideas.
// PGP Key: "curl -s http://zmi.at/zmi.asc | gpg --import"
// Fingerprint: AC19 F9D5 36ED CD8A EF38 500E CE14 91F7 1C12 09B4
// Keyserver: www.keyserver.net Key-ID: 1C1209B4

--nextPart2223884.jXlGJtiAGF
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)

iD8DBQBIT4TTzhSR9xwSCbQRAqhPAJwJPzf7mfBHvVghUpwDSgW+9GEvFQCg 1k3l
oohQIVcLWn0wrf9ZuZTZads=
=Hg7X
-----END PGP SIGNATURE-----

--nextPart2223884.jXlGJtiAGF--

Re: Disk Space issue

am 11.06.2008 10:19:43 von Pavan Deolasee

On Wed, Jun 11, 2008 at 1:12 PM, Devendra Singh Rawat
wrote:
> Hi All,
>
> I recreated my database this morning with a dump size of 3GB, which after database creation occupied 3.5GB on disk.
> And in less than 8 hours it has bloated to additional 3.7GB (the disk size now is 7.2GB).
>

Check if you have autovacuum enabled and configured properly. Btw, you
should seriously consider upgrading to newer release like 8.3 which
significantly improves performance for high UPDATE work load.

Thanks,
Pavan

--
Pavan Deolasee
EnterpriseDB http://www.enterprisedb.com

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: Disk Space issue

am 11.06.2008 10:57:38 von Tommy Gildseth

Devendra Singh Rawat wrote:
> Hi All,
>
> I recreated my database this morning with a dump size of 3GB, which after database creation occupied 3.5GB on disk.
> And in less than 8 hours it has bloated to additional 3.7GB (the disk size now is 7.2GB).
>
> There are quite a few DML operations which are happening on my DB.


This is a typical case where you can experience a good deal of index
bloat. I would recommend installing the dbsize contrib module, and
monitor the size of the relations (tables and indexes) in your database,
to see which relations in particular is growing rapidly in size.
Once you've identified the culprit, you could use reindex or cluster to
reclaim the dead space.
Note that reindex and cluster require fairly extensive locks, so not so
good to use on a busy database during working hours.


--
Tommy Gildseth


--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: Disk Space issue

am 11.06.2008 16:04:11 von Scott Marlowe

On Wed, Jun 11, 2008 at 1:42 AM, Devendra Singh Rawat
wrote:
> Hi All,
>
> I recreated my database this morning with a dump size of 3GB, which after database creation occupied 3.5GB on disk.
> And in less than 8 hours it has bloated to additional 3.7GB (the disk size now is 7.2GB).
>
> There are quite a few DML operations which are happening on my DB.

Note that 7.4 was pretty poor at recovering space from the catalogs
and the associated indexes. It could be that you would need to shut
down each night and vacuum full the catalogs in single user mode to
recover the space.

But it's been a while since I ran something older than 8.1 or so, so
it might have been an even older version that had those issues.

--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Re: Disk Space issue

am 11.06.2008 18:11:21 von Steve Crawford

Joshua D. Drake wrote:
> On Wed, 2008-06-11 at 09:36 +1000, Devendra Singh Rawat wrote:
>
>> Hi,
>>
>> We are using PostgreSQL 7.4.5 and facing issues with increasing disk space....
>>
>>
> ...I would also suggest strongly you update to the latest 7.4 dot release.
>

But as always read all the release notes between your current and your
intended version. Usually all that is required for maintenance upgrades
is installing new binaries but you can't assume that is always the case.
For the 7.4 series, pay special attention to the notes for 7.4.8 and 7.4.11:

http://www.postgresql.org/docs/7.4/static/release-7-4-8.html
http://www.postgresql.org/docs/7.4/static/release-7-4-11.htm l

Since it sounds like you are doing lots of dump and restore, these
issues may not be problematic for you. If possible in your situation,
updating to the latest version (8.3.1) is preferable.

Cheers,
Steve


--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin