RE: Vacuum only with 20% old tuples
Hiroshi Inoue <inoue@tpf.co.jp>
From: "Hiroshi Inoue" <Inoue@tpf.co.jp>
To: "Tom Lane" <tgl@sss.pgh.pa.us>
Cc: "Bruce Momjian" <pgman@candle.pha.pa.us>, "PostgreSQL-development" <pgsql-hackers@postgreSQL.org>
Date: 2000-07-12T04:58:17Z
Lists: 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