Re: Parallel query hangs after a smart shutdown is issued

From: Arseny Sher <a(dot)sher(at)postgrespro(dot)ru>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Parallel query hangs after a smart shutdown is issued
Date: 2020-08-14 15:31:24
Message-ID: 87mu2xjlbn.fsf@ars-thinkpad
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> Thomas Munro <thomas(dot)munro(at)gmail(dot)com> writes:
>> On Fri, Aug 14, 2020 at 4:45 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> After some more rethinking and testing, here's a v5 that feels
>>> fairly final to me. I realized that the logic in canAcceptConnections
>>> was kind of backwards: it's better to check the main pmState restrictions
>>> first and then the smart-shutdown restrictions afterwards.
>
>> LGTM. I tested this a bit today and it did what I expected for
>> parallel queries and vacuum, on primary and standby.
>
> Thanks for reviewing! I'll do the back-patching and push this today.

FWIW, I've also looked through the patch and it's fine. Moderate testing
also found no issues, check-world works, bgws are started during smart
shutdown as expected. And surely this is better than the inital
shorthack of allowing only parallel workers.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message vignesh C 2020-08-14 15:48:13 Re: Parallel copy
Previous Message Tom Lane 2020-08-14 14:54:38 Re: jsonb, collection & postgres_fdw