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...