Re: Refactoring speculative insertion with unique indexes a little

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Refactoring speculative insertion with unique indexes a little
Дата
Msg-id CAM3SWZQ50FfYX9ru=qUfPMSZfnvV+sEQDJBJc-Zo74-ED7+U-g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Refactoring speculative insertion with unique indexes a little  (Heikki Linnakangas <hlinnaka@iki.fi>)
Ответы Re: Refactoring speculative insertion with unique indexes a little  (Peter Geoghegan <pg@heroku.com>)
Список pgsql-hackers
On Thu, Jul 2, 2015 at 1:30 AM, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
>> Sure, if a speculative inserter detects a conflict, it still has to
>> wait. But not in the aminsert call, and not until it cleans up its
>> physical insertion (by super-deleting). Clearly a
>> CHECK_UNIQUE_SPECULATIVE would have to be much closer to
>> CHECK_UNIQUE_PARTIAL than to CHECK_UNIQUE_YES.
>
>
> Why is it not OK for aminsert to do the waiting, with
> CHECK_UNIQUE_SPECULATIVE?

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.

-- 
Peter Geoghegan



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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Configurable location for extension .control files
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Rework the way multixact truncations work