Re: autovacuum and TOAST tables - Mailing list pgsql-hackers

From Tom Lane
Subject Re: autovacuum and TOAST tables
Date
Msg-id 26106.1218239244@sss.pgh.pa.us
Whole thread Raw
In response to Re: autovacuum and TOAST tables  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: autovacuum and TOAST tables  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Note that this patch allows a toast table to be vacuumed by the user:
> I don't have a problem with that, but if anyone thinks this is not a
> good idea, please speak up.

The permissions on pg_toast will prevent anyone but a superuser from
doing that anyway, so it's no big deal.

Possibly more interesting is what happens if someone drops the parent
table while VACUUM is working independently on the toast table.  Does
DROP take exclusive lock on a toast table?  Probably, but it needs
to be checked.  I think preventing that scenario was one reason why
the vacuuming was tied together way back when.

(The same goes for any other parent-table DDL action that would affect
the toast table; CLUSTER or TRUNCATE for instance.)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: autovacuum and TOAST tables
Next
From: daveg
Date:
Subject: Re: Visibility Groups