From: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Arseny Sher <a(dot)sher(at)postgrespro(dot)ru> |
Subject: | Re: Parallel query hangs after a smart shutdown is issued |
Date: | 2020-08-14 06:03:47 |
Message-ID: | CA+hUKGK-1GafK3UE2gARcotsjEdTExznxi1SgnnYJfKAiR_Pcw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Aug 14, 2020 at 4:45 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> I wrote:
> > Hmmm ... maybe that should be more like
> > if (smartShutState != SMART_NORMAL_USAGE &&
> > backend_type == BACKEND_TYPE_NORMAL)
>
> 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.
> I'm assuming we want to back-patch this as far as 9.6, where parallel
> query began to be a thing.
Yeah. I mean, it's more radical than what I thought we'd be doing for
this, but you could get into real trouble by running in smart shutdown
mode without the autovac infrastructure alive.
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2020-08-14 06:14:37 | Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions |
Previous Message | Bharath Rupireddy | 2020-08-14 05:32:17 | Re: Inconsistent behavior of smart shutdown handling for queries with and without parallel workers |