Re: Incorrect errno used with %m for backend code

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Incorrect errno used with %m for backend code
Дата
Msg-id 20180622191406.3f4ykhdfpoqozgu3@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Incorrect errno used with %m for backend code  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
Hi,

On 2018-06-22 11:15:53 -0400, Alvaro Herrera wrote:
> I don't understand the logic in RestoreSlotFromDisk that fsync the file
> prior to reading it.  What are we protecting against?

we could previously have crashed before fsyncing. But we can only rely
on slot contents being durable if we fsync them. Therefore we fsync
before reading, after a crash.


> Anyway, while I think it would be nice to have CloseTransientFile
> restore the original errno if there was one and close goes well, it
> probably unduly complicates its API contract.

Yea, agreed.

Greetings,

Andres Freund


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [PATCH] Include application_name in "connection authorized" logmessage
Следующее
От: sixela
Дата:
Сообщение: Re: pg_verify_checksums review