Re: Eliminating VACUUM FULL WAS: remove flatfiles.c - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Eliminating VACUUM FULL WAS: remove flatfiles.c
Date
Msg-id 17447.1252092997@sss.pgh.pa.us
Whole thread Raw
In response to Re: Eliminating VACUUM FULL WAS: remove flatfiles.c  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: Eliminating VACUUM FULL WAS: remove flatfiles.c
Re: Eliminating VACUUM FULL WAS: remove flatfiles.c
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> No problem, just CLUSTER that table same as today.

Uh, no, that was Josh's point: you can't CLUSTER pg_class, because you
can't change its relfilenode.  If you do, backends won't know where to
read pg_class to find out its relfilenode.

I was wondering whether maintenance operations like "vacuum rewrite"
could get away with filling a new table file and then moving it into
place with rename(2), which is guaranteed atomic (at least on sane
filesystems).  The idea doesn't work right off because (1) you need
to atomically install the updated indexes too, and (2) the table
might span more than one segment file.  But maybe we could think of
something.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Eliminating VACUUM FULL WAS: remove flatfiles.c
Next
From: Tom Lane
Date:
Subject: Re: Eliminating VACUUM FULL WAS: remove flatfiles.c