Re: [HACKERS] Reversed sync check in pg_receivewal

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [HACKERS] Reversed sync check in pg_receivewal
Дата
Msg-id CAB7nPqQbV4MBV-0uzzjQPz743WHgiaFGYXjAK_Rq=skYCkZLpw@mail.gmail.com
обсуждение исходный текст
Ответ на [HACKERS] Reversed sync check in pg_receivewal  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-hackers
On Tue, Apr 11, 2017 at 9:41 PM, Magnus Hagander <magnus@hagander.net> wrote:
> This bug seems to have snuck in there with the introduction of walmethods.
> AFAICT we are testing the result of sync() backwards, so whenever a partial
> segment exists for pg_receivewal, it will fail. It will then unlink the
> file, so when it retries 5 seconds later it works.
>
> It also doesn't log the failure. Oops.
>
> Attached patch reverses the check, and adds a failure message. I'd
> appreciate a quick review in case I have the logic backwards in my head...

This has been fat-fingered in 56c7d8d4, and looking around I am not
seeing similar mistakes. Thanks for the fix.
-- 
Michael



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

Предыдущее
От: Álvaro Hernández Tortosa
Дата:
Сообщение: Re: [HACKERS] Some thoughts about SCRAM implementation
Следующее
От: Aleksander Alekseev
Дата:
Сообщение: Re: [HACKERS] Reversed sync check in pg_receivewal