Re: uninterruptable loop: concurrent delete in progress within table

Поиск
Список
Период
Сортировка
Искать
От
Andres Freund
Тема
Re: uninterruptable loop: concurrent delete in progress within table
Дата
Msg-id
20140605001424.GA15695@awork2.anarazel.de
Ответ на
Список
Дерево обсуждения
uninterruptable loop: concurrent delete in progress within table Sandro Santilli <strk@keybit.net>
Re: uninterruptable loop: concurrent delete in progress within table Alvaro Herrera <alvherre@2ndquadrant.com>
Re: uninterruptable loop: concurrent delete in progress within table Andres Freund <andres@2ndquadrant.com>
Re: uninterruptable loop: concurrent delete in progress within table Sandro Santilli <strk@keybit.net>
Re: uninterruptable loop: concurrent delete in progress within table Sandro Santilli <strk@keybit.net>
Re: uninterruptable loop: concurrent delete in progress within table Andres Freund <andres@2ndquadrant.com>
Re: uninterruptable loop: concurrent delete in progress within table Andres Freund <andres@2ndquadrant.com>
Re: uninterruptable loop: concurrent delete in progress within table Andres Freund <andres@2ndquadrant.com>
Re: uninterruptable loop: concurrent delete in progress within table Kevin Grittner <kgrittn@ymail.com>
Re: uninterruptable loop: concurrent delete in progress within table Tom Lane <tgl@sss.pgh.pa.us>
Re: uninterruptable loop: concurrent delete in progress within table Kevin Grittner <kgrittn@ymail.com>
Re: uninterruptable loop: concurrent delete in progress within table Andres Freund <andres@2ndquadrant.com>
Re: uninterruptable loop: concurrent delete in progress within table Alvaro Herrera <alvherre@2ndquadrant.com>
Re: uninterruptable loop: concurrent delete in progress within table Andres Freund <andres@2ndquadrant.com>
Re: uninterruptable loop: concurrent delete in progress within table Alvaro Herrera <alvherre@2ndquadrant.com>
Re: uninterruptable loop: concurrent delete in progress within table Andres Freund <andres@2ndquadrant.com>
Re: uninterruptable loop: concurrent delete in progress within table Alvaro Herrera <alvherre@2ndquadrant.com>
Re: uninterruptable loop: concurrent delete in progress within table Andres Freund <andres@2ndquadrant.com>
Re: uninterruptable loop: concurrent delete in progress within table Robert Haas <robertmhaas@gmail.com>
Re: uninterruptable loop: concurrent delete in progress within table Andres Freund <andres@2ndquadrant.com>
Re: uninterruptable loop: concurrent delete in progress within table Robert Haas <robertmhaas@gmail.com>
Re: uninterruptable loop: concurrent delete in progress within table Tom Lane <tgl@sss.pgh.pa.us>
Re: uninterruptable loop: concurrent delete in progress within table Andres Freund <andres@2ndquadrant.com>
Re: uninterruptable loop: concurrent delete in progress within table Andres Freund <andres@2ndquadrant.com>
Re: uninterruptable loop: concurrent delete in progress within table Sandro Santilli <strk@keybit.net>
Re: uninterruptable loop: concurrent delete in progress within table Sandro Santilli <strk@keybit.net>
Re: uninterruptable loop: concurrent delete in progress within table Andres Freund <andres@2ndquadrant.com>
Re: uninterruptable loop: concurrent delete in progress within table Sandro Santilli <strk@keybit.net>
On 2014-06-04 19:27:54 -0400, Robert Haas wrote:
> On Wed, Jun 4, 2014 at 7:10 PM, Andres Freund  wrote:
> > On 2014-06-04 19:03:15 -0400, Robert Haas wrote:
> >> On Mon, Jun 2, 2014 at 1:35 PM, Andres Freund  wrote:
> >> > Robert: Do you remember that case?
> >> >
> >> > Alvaro: In the end it'd not be very harmful - if it happens
> >> > TransactionIdDidCommit() will return false (there's special case code
> >> > for it).
> >>
> >> Not specifically, but I'd be surprised if it isn't possible.
> >
> > Wouldn't that mean that every single visibility routine in tqual.c is
> > buggy?
> >
> > I am not convinced there aren't further bugs in some corner cases in
> > tqual.c. But even a low likelihood scenarious of
> > xmax = InvalidTransactionId && (infomask & XMAX_INVALID) == 0
> > would have become visible by now given how widespread/central those
> > tests are?
> 
> What specifically do you think will break?

If XMAX_INVALID may accidentally not be set even though there's no xmax,
other xmax flags could be bogus as well. Afaics there's no difference in
the handling between them.
And then tests for LOCKED_ONLY, IS_MULTI and such would be dodgy.

The only things that - afaics - are allowed to to change the actual xmax
transactionid are:
* freezing
* heap_(update|delete|lock)_tuple

And of those only freezing will unset xmax to InvalidTransactionId. But
it re-sets XMAX_INVALID (and clears all other xmax flags).

So I don't really see a danger. But you're right, even if there were
cases where that case happens - without any other odd flags - we'd still
be safe.

Greetings,

Andres Freund

-- 
 Andres Freund	                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-bugs по дате отправления
От: Tom Lane
Дата:
От: Haribabu Kommi
Дата:
FAQ