Re: [HACKERS] Reproducible vacuum complaint! - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Reproducible vacuum complaint!
Date
Msg-id 21019.943243870@sss.pgh.pa.us
Whole thread Raw
In response to RE: [HACKERS] Reproducible vacuum complaint!  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
List pgsql-hackers
"Hiroshi Inoue" <Inoue@tpf.co.jp> writes:
> Hmm,if "select * .." runs in SERIALIZABLE isolation level,the transaction
> would see an old "msg_id=42" tuple(not new one). So vacuum doesn't
> vanish the old "msg_id=42" tuple. Vacuum takes all running transactions
> into account. But AFAIK,there's no other such stuff.
> CREATE INDEX may be another one which should take all running 
> transactions into account.

Oh, I think I see --- you mean that CREATE INDEX needs to make index
entries for tuples that are committed dead but might still be visible
to some running transaction somewhere.  Yes, that seems to fit what
I was seeing.  VACUUM always complained that there were too few
index entries, never too many.

It looks like btbuild() only indexes tuples that satisfy SnapshotNow,
so this is definitely a potential problem for btree indexes.  The other
index types are likely broken in the same way...

Comments anyone?  What time qual should btbuild and friends be using,
if not that?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] New regression driver
Next
From: Vadim Mikheev
Date:
Subject: Re: [HACKERS] Reproducible vacuum complaint!