Re: Inconsistent behavior of smart shutdown handling for queries with and without parallel workers - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Inconsistent behavior of smart shutdown handling for queries with and without parallel workers
Date
Msg-id 574521.1597416050@sss.pgh.pa.us
Whole thread Raw
In response to Re: Inconsistent behavior of smart shutdown handling for queries with and without parallel workers  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
List pgsql-hackers
Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> writes:
> Is there any way the bgworkers(for that matter, any postmaster's child
> process) knowing that there's a smart shutdown pending? This is
> useful, if any of the bgworker(if not parallel workers) want to
> differentiate the two modes i.e. smart and fast shutdown modes and
> smartly finish of their work.

With the patch I'm working on, the approach is basically that smart
shutdown changes nothing except for not allowing new connections ...
until the last regular connection is gone, at which point it starts to
act exactly like fast shutdown.  So in those terms there is no need for
bgworkers to know the difference.  If a bgworker did act differently
during the initial phase of a smart shutdown, that would arguably be
a bug, just as it's a bug that parallel query isn't working.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Parallel query hangs after a smart shutdown is issued
Next
From: Tom Lane
Date:
Subject: Re: jsonb, collection & postgres_fdw