Re: abnormal data grow - Mailing list pgsql-general

From Reynard Hilman
Subject Re: abnormal data grow
Date
Msg-id 415075A3.7030405@lightsky.com
Whole thread Raw
In response to Re: abnormal data grow  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: abnormal data grow
List pgsql-general
>Okay, so you have a lot of wide (toasted) fields in whatever table that
>toast table belongs to --- if you're not sure, try
>
>select relname from pg_class where
>reltoastrelid = (select oid from pg_class where relfilenode = 25677563);
>
>VACUUM VERBOSE on that table would give some useful info.
>
>            regards, tom lane
>
>
Thank you Tom! This query finds the culprit right away. There is one
table that acts as a log file, storing the transactions sql that's
happening on the db, so the db size grows when the logging is turned on.
After doing some cleaning on this table, it shrinks the database to
500Mb again.
Just curious though, why the toast file for this transaction table takes
the most space (the transaction table itself was only about 10Mb),
considering there are a few other tables with bigger size (40Mb) than
this transaction table but do not have toast file that's comparable in
size to this one.

- reynard


pgsql-general by date:

Previous
From: Greg Stark
Date:
Subject: Re: Oracle / Postgres Interface
Next
From: Alvaro Herrera
Date:
Subject: Re: Stored Procedures