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

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Race condition in logical walsender causes long postgresql shutdown delay
Date: 2019-09-11 19:52:33
Message-ID: 20190911195233.GA3904@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 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.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment Content-Type Size
v3-0001-Fix-a-delay-in-PostgreSQL-shutdown-caused-by-logi.patch text/x-diff 4.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2019-09-11 20:52:01 Re: psql - improve test coverage from 41% to 88%
Previous Message Nino Floris 2019-09-11 18:44:39 Re: [PATCH] ltree, lquery, and ltxtquery binary protocol support