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

From Vadim Mikheev
Subject Re: [HACKERS] Reproducible vacuum complaint!
Date
Msg-id 3838D24F.DB274049@krs.ru
Whole thread Raw
In response to Re: [HACKERS] Reproducible vacuum complaint!  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> 
> "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.
...
> 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?

Seems that we need in new 

#define SnapshotAny        ((Snapshot) 0x2)

and new HeapTupleSatisfiesAny() returning TRUE for any tuple
with valid and committed (or current xact id) t_xmin.

-:(

Sorry, I missed CREATE INDEX case.

Vadim
P.S. I'll comment about indices and vacuum latter...


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Reproducible vacuum complaint!
Next
From: Bruce Momjian
Date:
Subject: cache question