Re: Refactoring the checkpointer's fsync request queue

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Refactoring the checkpointer's fsync request queue
Дата
Msg-id 20181113180114.hqporqfdnbyvlx7q@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Refactoring the checkpointer's fsync request queue  (Thomas Munro <thomas.munro@enterprisedb.com>)
Список pgsql-hackers
Hi,

On 2018-11-12 15:58:41 +1300, Thomas Munro wrote:
> There is one major problem with this patch:  BufferSync(), run in the
> checkpointer, can deadlock against a backend that holds a buffer lock
> and is blocked in SendFsyncRequest().  To break this deadlock, we need
> way out of it on either the sending or receiving side.  Here are three
> ideas:

That's the deadlock I'd mentioned in Pune (?) btw.


> 1.  Go back to the current pressure-valve strategy: make the sending
> side perform the fsync(), if it can't immediately write to the pipe.

I don't think that's correct / safe?  I've previously wondered whether
there's any way we could delay the write to a point where the buffer is
not locked anymore - as far as I can tell it's actually not required for
correctness that we send the fsync request before unlocking.  It's
architecturally a bit dicey tho :(

Greetings,

Andres Freund


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

Предыдущее
От: Jean-Christophe Arnu
Дата:
Сообщение: Re: wal_dump output on CREATE DATABASE
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Refactoring the checkpointer's fsync request queue