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

From Tom Lane
Subject Re: handling TOAST tables in autovacuum
Date
Msg-id 18944.1212967066@sss.pgh.pa.us
Whole thread Raw
In response to handling TOAST tables in autovacuum  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: handling TOAST tables in autovacuum  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> The only change of some consideration is that we will need two passes
> over pg_class to get the list of relations to vacuum, instead of one as
> we do currently.  The problem is that we first need to fetch the
> (heap relid, toast relid) mapping before attempting to figure out if any
> given TOAST table needs vacuuming.  This is because we want to be using
> the main table's pg_autovacuum, and we can't get at that unless we know
> the main relid.

Umm ... is it chiseled in stone someplace that toast tables shouldn't
have their own pg_autovacuum entries?  Seems like that might be a
reasonable component of a "whole nine yards" approach.

> Should we display TOAST tables separately in pg_stat_*_tables?  (Maybe
> pg_stat_toast_tables?)

+1 for pg_stat_toast_tables, I think.  If you separate them out then
there will need to be some kind of smarts to help the user figure out
which main table a toast table belongs to.  This would be easy with a
separate view.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Re: Overhauling GUCS
Next
From: Robert Treat
Date:
Subject: Re: pg_dump restore time and Foreign Keys