Re: [HACKERS] Reproducible vacuum complaint!

Поиск
Список
Период
Сортировка
От Vadim Mikheev
Тема Re: [HACKERS] Reproducible vacuum complaint!
Дата
Msg-id 3838D24F.DB274049@krs.ru
обсуждение исходный текст
Ответ на Re: [HACKERS] Reproducible vacuum complaint!  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Reproducible vacuum complaint!
Следующее
От: Bruce Momjian
Дата:
Сообщение: cache question