public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Andres Freund <[email protected]>
Cc: Robert Haas <[email protected]>
Cc: Bharath Rupireddy <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Issue with cancel_before_shmem_exit while searching to remove a particular registered exit callbacks
Date: Mon, 10 Aug 2020 20:46:02 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <CA+TgmobdNtd+6gr2zFH6mTSDoNAwYNt=z=Jr1h59vM+PYrbQeQ@mail.gmail.com>
<CA+Tgmoa_VpiNjKurhkScXaZbu6s7=NP6PL0NL4fMgstXNeGfPQ@mail.gmail.com>
<CALj2ACX6O=UnQjR7p4nED45oWzj2gXWaXgcUmk_MwfVBVMQM9A@mail.gmail.com>
<CA+TgmoY8hrNE-sO+B95M8AD6CL9VohSMik2VZkrnkbANRDS5gw@mail.gmail.com>
<[email protected]>
<CA+TgmoYgNMc7x814iih==wH-jN-4bO_FH_xWBdV5HEK=6e3kDQ@mail.gmail.com>
<[email protected]>
<CA+TgmobBH1SGmQY6G9x4nth03bJXyg2FXEbmNqs-_aRp1peAgQ@mail.gmail.com>
<[email protected]>
<CA+Tgmoaz=e0CEOVpFTMRtanXX+0P-1uRrYtKdWktQedLtGs6Qg@mail.gmail.com>
<[email protected]>
Andres Freund <[email protected]> writes:
> I think there's two different aspects here: Having before_shmem_exit(),
> and having cancel_before_shmem_exit(). We could just not have the
> latter, and instead use a separate list for PG_ENSURE_ERROR_CLEANUP
> internally. With the callback for PG_ENSURE_ERROR_CLEANUP calling those
> from its private list. There's no other uses of
> cancel_before_shmem_exit afaict.
It's certainly arguable that PG_ENSURE_ERROR_CLEANUP is a special
snowflake and needs to use a separate mechanism. What is not real clear
to me is why there are any other callers that must use before_shmem_exit
rather than on_shmem_exit --- IOW, except for P_E_E_C's use, I have never
been persuaded that the former callback list should exist at all. The
expectation for on_shmem_exit is that callbacks correspond to system
service modules that are initialized in a particular order, and can safely
be torn down in the reverse order. Why can't the existing callers just
make even-later entries into that same callback list?
regards, tom lane
view thread (28+ messages) latest in thread
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], [email protected], [email protected]
Subject: Re: Issue with cancel_before_shmem_exit while searching to remove a particular registered exit callbacks
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