Re: Faster inserts with mostly-monotonically increasing values

Поиск
Список
Период
Сортировка
От Claudio Freire
Тема Re: Faster inserts with mostly-monotonically increasing values
Дата
Msg-id CAGTBQpaYXRVmp+x+FZ+hABWe6AKCq7X06zj-ikktk1_jtY70nw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Faster inserts with mostly-monotonically increasing values  (Claudio Freire <klaussfreire@gmail.com>)
Список pgsql-hackers
On Mon, Mar 5, 2018 at 9:37 PM, Claudio Freire <klaussfreire@gmail.com> wrote:
> Assuming the rightmost page is the first page the value could be on,
> it already does get an exclusive buffer lock.

That made me check, and:

+        /*
+         * Acquire exclusive lock on the buffer before doing any checks. This
+         * ensures that the index state cannot change, as far as the rightmost
+         * part of the index is concerned.
+         */
+        LockBuffer(buf, BUFFER_LOCK_EXCLUSIVE);

BTree code uses BT_READ and BT_WRITE instead, so that should be:

LockBuffer(buf, BT_WRITE)


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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Cache lookup errors with functions manipulation object addresses
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Fix inadequate locking during get_rel_oids().