Re: Small race in pg_xlogdump --follow

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Small race in pg_xlogdump --follow
Date: 2016-09-26 13:59:15
Message-ID: 30627.1474898355@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Magnus Hagander <magnus(at)hagander(dot)net> writes:
> 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.

Right. On a larger scale --- I'm too uncaffeinated to figure out whether
this is the code path taken for the initially user-supplied file name.
But it would be unfriendly if when you fat-finger the command line
arguments, it takes 5 seconds for pg_xlogdump to tell you so. Maybe
the looping behavior should only happen on non-first file access.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2016-09-26 14:18:36 Re: [RFC] Should we fix postmaster to avoid slow shutdown?
Previous Message Vladimir Gordiychuk 2016-09-26 13:52:01 Re: Stopping logical replication protocol