Re: abnormal data grow

From: Reynard Hilman <reynardmh(at)lightsky(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: abnormal data grow
Date: 2004-09-21 18:40:35
Message-ID: 415075A3.7030405@lightsky.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2004-09-21 19:08:10 Re: Stored Procedures
Previous Message Kevin Murphy 2004-09-21 18:16:44 the current scoop on ilike and indexes