Re: toast table growing indefinitely? Known problems? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: toast table growing indefinitely? Known problems?
Date
Msg-id 9399.1038807449@sss.pgh.pa.us
Whole thread Raw
In response to toast table growing indefinitely? Known problems?  (Philip Warner <pjw@rhyme.com.au>)
Responses Re: toast table growing indefinitely? Known
List pgsql-hackers
Philip Warner <pjw@rhyme.com.au> writes:
> Is there a known problem with TOAST tables growing indefinitely in 7.2?

No.  The index on the toast table may well bloat, because it's tracking
a moving range of toast-item OIDs.  But the table itself should be okay
so long as it's vacuumed regularly.

If you're seeing bloat while using plain (not full) vacuums, my guess
would be that you need to enlarge the FSM parameters in postgresql.conf.

> On a separate issue, we have seen toast indexes growing indefinitely on 7.3 
> despite VACUUM FULL. Attempting a reindex results in:

> # reindex table tt;
> WARNING:  table "tt" wasn't reindexed
> REINDEX

AFAIK that will only reindex tt's own indexes.  To reindex the toast
table would require naming same, with something like:

regression=# reindex table pg_toast.pg_toast_1675403;
REINDEX

or you could specify the index:

regression=# reindex index pg_toast.pg_toast_1675403_index;
REINDEX

The number that appears in these names is the OID of the table owning
the toast table (ie, tt's oid).
        regards, tom lane


pgsql-hackers by date:

Previous
From: Joe Conway
Date:
Subject: Re: 7.4 Wishlist
Next
From: Philip Warner
Date:
Subject: Re: toast table growing indefinitely? Known