From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Small race in pg_xlogdump --follow |
Date: | 2016-09-26 13:48:59 |
Message-ID: | CABUevEyQqURaa6gRMRSvrM9vEGAFNc-0OuF4Y0F_r3_+md9_Bw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Sep 26, 2016 at 3:44 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Magnus Hagander <magnus(at)hagander(dot)net> writes:
> > Attached patch puts a retry loop around opening the file that retries
> for 5
> > seconds (which is excessive, but should be safe) in case the file is
> > missing (and still fails out for other error messages of course).
>
> > Comments?
>
> The patch assumes that pg_usleep won't change errno, an assumption
> I have little faith in.
>
>
Oh, right, at the very last loop. I've never seen it need more than 1 loop
so I didn't manage to hit that codepath :) But yeah, saving errno and
restoring it on the other side of pg_usleep is probably a good idea.
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
Attachment | Content-Type | Size |
---|---|---|
pg_xlogdump_race2.patch | text/x-patch | 1.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Vladimir Gordiychuk | 2016-09-26 13:52:01 | Re: Stopping logical replication protocol |
Previous Message | Jeevan Ladhe | 2016-09-26 13:45:02 | Re: pgbench more operators & functions |