Re: MarkBufferDirtyHint() and LSN update

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: MarkBufferDirtyHint() and LSN update
Дата
Msg-id 20191114030129.GA1910@paquier.xyz
обсуждение исходный текст
Ответ на Re: MarkBufferDirtyHint() and LSN update  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: MarkBufferDirtyHint() and LSN update  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-hackers
On Wed, Nov 13, 2019 at 09:17:03PM +0900, Michael Paquier wrote:
> Actually, no, this is not good.  I have been studying more the patch,
> and after stressing more this code path with a cluster having
> checksums enabled and shared_buffers at 1MB, I have been able to make
> a couple of page's LSNs go backwards with pgbench -s 100.  The cause
> was simply that the page got flushed with a newer LSN than what was
> returned by XLogSaveBufferForHint() before taking the buffer header
> lock, so updating only the LSN for a non-dirty page was simply
> guarding against that.

for the reference attached is the trick I have used, adding an extra
assertion check in PageSetLSN().
--
Michael

Вложения

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Ought to use heap_multi_insert() for pg_attribute/dependinsertions?
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [PATCH] use separate PartitionedRelOptions structure to storepartitioned table options