Re: handling TOAST tables in autovacuum

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: handling TOAST tables in autovacuum
Date: 2008-06-08 23:17:46
Message-ID: 18944.1212967066@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)commandprompt(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Treat 2008-06-08 23:45:33 Re: pg_dump restore time and Foreign Keys
Previous Message Gregory Stark 2008-06-08 23:07:21 Re: Overhauling GUCS