Re: Parallel query hangs after a smart shutdown is issued - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Parallel query hangs after a smart shutdown is issued
Date
Msg-id 398962.1597294682@sss.pgh.pa.us
Whole thread Raw
In response to Re: Parallel query hangs after a smart shutdown is issued  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: Parallel query hangs after a smart shutdown is issued
List pgsql-hackers
Thomas Munro <thomas.munro@gmail.com> writes:
> Makes sense.  I tested this version on a primary and a replica and
> verified that parallel workers launch, but I saw that autovacuum
> workers still can't start without something like this:

> @@ -2463,7 +2463,8 @@ canAcceptConnections(int backend_type)
>          * be returned until we have checked for too many children.
>          */
>         if (smartShutState != SMART_NORMAL_USAGE &&
> -               backend_type != BACKEND_TYPE_BGWORKER)
> +               backend_type != BACKEND_TYPE_BGWORKER &&
> +               backend_type != BACKEND_TYPE_AUTOVAC)

Hmmm ... maybe that should be more like

        if (smartShutState != SMART_NORMAL_USAGE &&
            backend_type == BACKEND_TYPE_NORMAL)

(the adjacent comment needs adjustment too of course).

            regards, tom lane



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Parallel query hangs after a smart shutdown is issued
Next
From: Pavel Stehule
Date:
Subject: Re: [bug+patch] Inserting DEFAULT into generated columns from VALUES RTE