RE: Vacuum only with 20% old tuples - Mailing list pgsql-hackers

From Hiroshi Inoue
Subject RE: Vacuum only with 20% old tuples
Date
Msg-id 002701bfebbd$caa1a240$2801007e@tpf.co.jp
Whole thread Raw
In response to Re: Vacuum only with 20% old tuples  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> 
> "Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
> >> Basically what I want here is to build the new index relation as
> >> a new file (set of files, if large) and then atomically commit it
> >> as the new version of the index.
> 
> > Hmm,your plan seems to need WAL.
> > We must postpone to build indexes until the end of tuple moving
> > in vacuum. Once tuple moving started,the consistency between
> > heap and indexes would be broken. Currently(without WAL) this
> > inconsistency could never be recovered in case of rollback.
> 
> Why?  The same commit that makes the new index valid would make the
> tuple movements valid.

Oops,I rememered I wasn't correct. Certainly it's not so dangerous as
I wrote. But there remains a possibilty that index tuples would point to
cleaned heap blocks unless we delete index tuples for those heap blocks.
Cleaned blocks would be reused by UPDATE operation. 

Regards.

Hiroshi Inoue






pgsql-hackers by date:

Previous
From: M.Feldtmann@t-online.de (Marten Feldtmann)
Date:
Subject: Re: Alternative new libpq interface.
Next
From: Tom Lane
Date:
Subject: Re: Performance problem in aset.c