Re: handling TOAST tables in autovacuum - Mailing list pgsql-hackers

From Tom Lane
Subject Re: handling TOAST tables in autovacuum
Date
Msg-id 25296.1212971005@sss.pgh.pa.us
Whole thread Raw
In response to Re: handling TOAST tables in autovacuum  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> The point here is that if the user disables autovac for the main table,
> then it's expected that it is automagically disabled for the toast table
> as well, for the usual case where they are disabling it because the
> table is too big.

Hmm, good point.  OK, two passes it is.  (I thought about remembering
the toast table rows in memory so as not to scan the catalog twice,
but I'm not sure you really save much that way.)

Another thing to think about here is locking: I believe you need to get
a vacuum-type lock on the parent table not only the toast table, so
vacuuming a toast table without any knowledge of which table is its
parent ain't gonna fly anyway.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: handling TOAST tables in autovacuum
Next
From: Andrew Dunstan
Date:
Subject: Re: libpq support for arrays and composites