Re: Refactoring speculative insertion with unique indexes a little

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Refactoring speculative insertion with unique indexes a little
Дата
Msg-id CAM3SWZQevhZafTa4tWy=tUkeF--0CWFDFAN+mwn5sz1ujHoDZw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Refactoring speculative insertion with unique indexes a little  (Peter Geoghegan <pg@heroku.com>)
Ответы Re: Refactoring speculative insertion with unique indexes a little  (Peter Geoghegan <pg@heroku.com>)
Список pgsql-hackers
On Thu, Jul 2, 2015 at 10:49 AM, Peter Geoghegan <pg@heroku.com> wrote:
> Well, waiting means getting a ShareLock on the other session's XID.
> You can't do that without first releasing your locks, unless you're
> okay with unprincipled deadlocks.

Besides, if the other session wins the race and inserts a physical
heap tuple, but then aborts its xact, we might have to insert again
(although not before super-deleting), with that insert going on to be
successful.

As with row locking, with insertion, if there is a conflict, any
outcome (UPDATE or INSERT) is then possible.

-- 
Peter Geoghegan



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Time to fully remove heap_formtuple() and friends?
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: WAL logging problem in 9.4.3?