[HACKERS] Reversed sync check in pg_receivewal

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема [HACKERS] Reversed sync check in pg_receivewal
Дата
Msg-id CABUevEyTV2gMpfnraS=uPSX+JXRwSR+1Jt5DLYb1bcQ8DEVS+A@mail.gmail.com
обсуждение исходный текст
Ответы Re: [HACKERS] Reversed sync check in pg_receivewal
Re: [HACKERS] Reversed sync check in pg_receivewal
Re: [HACKERS] Reversed sync check in pg_receivewal
Список pgsql-hackers
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...

--
Вложения

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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: [HACKERS] [PATCH v1] Add and report the new "in_hot_standby" GUC pseudo-variable.
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: [pgsql-www] [HACKERS] Small issue in online devel documentation build