Re: Duplicate Item Pointers in Gin index

Поиск
Список
Период
Сортировка
От Masahiko Sawada
Тема Re: Duplicate Item Pointers in Gin index
Дата
Msg-id CAD21AoDx1C0Y1QJ7oBcoWJEf46W_RvwPJkmUpLYAn1bM17t6YQ@mail.gmail.com
обсуждение исходный текст
Ответ на Duplicate Item Pointers in Gin index  ("R, Siva" <sivasubr@amazon.com>)
Ответы Re: Duplicate Item Pointers in Gin index
Re: Duplicate Item Pointers in Gin index
Список pgsql-hackers
On Wed, Feb 21, 2018 at 8:30 AM, R, Siva <sivasubr@amazon.com> wrote:
> User backend (let us call this backend 1) has released the lock on the
> metapage and is processing the pending list pages, adding the items to the
> build accumulator. Let us assume that there are currently 2 pages in the
> pending list and metadata->head is currently being processed (metadata->tail
> is not locked yet) and the old tuple id that was deleted is added to the
> accumulator.
> Another user backend (let us call this backend 2) uses the tid that was
> marked re-usable for a row that contains the same key datum as before, takes
> metapage lock and inserts into the pending list (metadata->tail) and returns
> (assume it does not do cleanup).

IIUC, ginInsertCleanup() holds ExclusiveLock on metapage during adding
tuples in the pending list to the accumulator. And inserting entries
to the pending list also requires ExclusiveLock on metapage. This
behavior is not relevant with that bug fix. So I don't think that
backend2 can inserts a tuple while backend1 is processing the pending
list.

Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: file cloning in pg_upgrade and CREATE DATABASE
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Duplicate Item Pointers in Gin index