Re: Eliminating VACUUM FULL WAS: remove flatfiles.c

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, daveg(at)sonic(dot)net, Andrew Dunstan <andrew(at)dunslane(dot)net>, Greg Stark <gsstark(at)mit(dot)edu>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Eliminating VACUUM FULL WAS: remove flatfiles.c
Date: 2009-09-04 21:00:53
Message-ID: 20090904210053.GN5603@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dimitri Fontaine escribió:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > Dimitri Fontaine escribió:
> >> Why can't MVCC apply here? You'd have two versions of the pg_class entry
> >> that just has been CLUSTERed, and you keep the old relfilenode arround
> >> too. MVCC applies, and you teach vacuum to clean out the old file when
> >> cleaning out the no more visible tuple.
> >
> > It just doesn't work. pg_class (and various other rels) are special
> > because they are needed to bootstrap the catalog system. See
> > RelationCacheInitializePhase3. It wouldn't be possible to figure out
> > what's pg_class relfilenode until you have read it from pg_class, which
> > is precisely what we're trying to do.
>
> Well at bootstrap time I guess noone is able to disturb the system by
> placing a concurrent CLUSTER pg_class; call. Once started, do those rels
> still need to have a special behavior?

The relcache need to be bootstrapped more than once, not just at
initdb's bootstrap. (I guess you could try a breakpoint in formrdesc)

> I guess I'm being dense, will now let people in the know find a solution...

Yeah, well, Tom just posted a possible solution :-)

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-09-04 21:01:25 Re: Eliminating VACUUM FULL WAS: remove flatfiles.c
Previous Message Dimitri Fontaine 2009-09-04 20:54:28 Re: Eliminating VACUUM FULL WAS: remove flatfiles.c