Re: [PATCH] Race condition in logical walsender causes long postgresql shutdown delay

2019-10-18 Thread Craig Ringer
On Thu, 17 Oct 2019 at 21:19, Alvaro Herrera wrote: > On 2019-Sep-26, Alvaro Herrera wrote: > > > On 2019-Sep-26, Jeff Janes wrote: > > > > Hi Alvaro, does this count as a review? > > > > Well, I'm already a second pair of eyes for Craig's code, so I think it > > does :-) I would have liked conf

Re: [PATCH] Race condition in logical walsender causes long postgresql shutdown delay

2019-10-17 Thread Alvaro Herrera
On 2019-Sep-26, Alvaro Herrera wrote: > On 2019-Sep-26, Jeff Janes wrote: > > Hi Alvaro, does this count as a review? > > Well, I'm already a second pair of eyes for Craig's code, so I think it > does :-) I would have liked confirmation from Craig that my change > looks okay to him too, but may

Re: [PATCH] Race condition in logical walsender causes long postgresql shutdown delay

2019-09-26 Thread Alvaro Herrera
On 2019-Sep-26, Jeff Janes wrote: > On Wed, Sep 11, 2019 at 3:52 PM Alvaro Herrera > wrote: > > > Reading over this code, I noticed that the detection of the catch-up > > state ends up being duplicate code, so I would rework that function as > > in the attached patch. > > > > The naming of those

Re: [PATCH] Race condition in logical walsender causes long postgresql shutdown delay

2019-09-26 Thread Jeff Janes
On Wed, Sep 11, 2019 at 3:52 PM Alvaro Herrera wrote: > > Reading over this code, I noticed that the detection of the catch-up > state ends up being duplicate code, so I would rework that function as > in the attached patch. > > The naming of those flags (got_SIGUSR2, got_STOPPING) is terrible, b

Re: [PATCH] Race condition in logical walsender causes long postgresql shutdown delay

2019-09-11 Thread Alvaro Herrera
On 2019-Sep-03, Alvaro Herrera wrote: > On 2019-Jul-25, Craig Ringer wrote: > > > Patch attached. > > Here's a non-broken version of this patch. I have not done anything > other than reflowing the new comment. Reading over this code, I noticed that the detection of the catch-up state ends up b

Re: [PATCH] Race condition in logical walsender causes long postgresql shutdown delay

2019-09-03 Thread Alvaro Herrera
On 2019-Jul-25, Craig Ringer wrote: > Patch attached. Here's a non-broken version of this patch. I have not done anything other than reflowing the new comment. -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services >F

[PATCH] Race condition in logical walsender causes long postgresql shutdown delay

2019-07-24 Thread Craig Ringer
Hi folks I recently tracked down a race in shutdown of logical walsenders that can cause PostgreSQL shutdown to hang for wal_sender_timeout/2 before it continues to a normal shutdown. With a long timeout that can be quite disruptive. TL;DR: The logical walsender may be signalled to stop, then rea