public inbox for [email protected]
help / color / mirror / Atom feedFrom: [email protected]
To: Robert Haas <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: PostgreSQL shutdown modes
Date: Sat, 02 Apr 2022 09:39:52 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+TgmoYxs1dzDN5jc5rVJz236M0uOd6QA2JiY+1yb=BVYg8MgA@mail.gmail.com>
References: <CA+TgmoYxs1dzDN5jc5rVJz236M0uOd6QA2JiY+1yb=BVYg8MgA@mail.gmail.com>
On 2022-04-01 13:22, Robert Haas wrote:
> I attach herewith a modest patch to rename these shutdown modes to
> more accurately correspond to their actual characteristics.
I've waited for April 2nd to submit this comment, but it seemed to me
that the
suggestion about the first-pass checkpoint in 'slow' mode is a
no-foolin' good one.
Then I wondered whether there could be an option to accompany the 'dumb'
mode that
would take a WHERE clause, to be implicitly applied to pg_stat_activity,
whose
purpose would be to select those sessions that are ok to evict without
waiting for
them to exit. It could recognize, say, backend connections in no current
transaction
that are from your pesky app or connection pooler that holds things
open. It could
also, for example, select things in transaction state but where
current_timestamp - state_change > '5 minutes' (so it would be
re-evaluated every
so often until ready to shut down).
For conciseness (and sanity), maybe the WHERE clause could be implicitly
applied,
not to pg_stat_activity directly, but to a (virtual or actual) view that
has
already been restricted to client backend sessions, and already has a
column
for current_timestamp - state_change.
Regards,
-Chap
view thread (2+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: PostgreSQL shutdown modes
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox