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

Jeff Janes <jeff.janes@gmail.com>

From: Jeff Janes <jeff.janes@gmail.com>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Craig Ringer <craig@2ndquadrant.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2019-09-26T23:57:51Z
Lists: pgsql-hackers
On Wed, Sep 11, 2019 at 3:52 PM Alvaro Herrera <alvherre@2ndquadrant.com>
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, but
> I'm not going to change that in a backpatchable bug fix.
>

Hi Alvaro, does this count as a review?  And Craig, do you agree with
Alvaro's patch as a replacement for your own?

Thanks,

Jeff

Commits

  1. Fix minor bug in logical-replication walsender shutdown

  2. Prevent possibility of panics during shutdown checkpoint.