| From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
|---|---|
| To: | Magnus Hagander <magnus(at)hagander(dot)net> |
| Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Reversed sync check in pg_receivewal |
| Date: | 2017-04-11 13:24:45 |
| Message-ID: | CAB7nPqQbV4MBV-0uzzjQPz743WHgiaFGYXjAK_Rq=skYCkZLpw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Apr 11, 2017 at 9:41 PM, Magnus Hagander <magnus(at)hagander(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Aleksander Alekseev | 2017-04-11 13:28:09 | Re: Reversed sync check in pg_receivewal |
| Previous Message | Álvaro Hernández Tortosa | 2017-04-11 13:20:33 | Re: Some thoughts about SCRAM implementation |