From: Noah Misch <noah@leadboat.com>
To: Amit Kapila <amit.kapila16@gmail.com>
Cc: Kirill Reshke <reshkekirill@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: TerminateOtherDBBackends code comments inconsistency.
Date: Tue, 30 Apr 2024 10:06:18 -0700
Message-ID: <20240430170618.b3.nmisch@google.com> (raw)
In-Reply-To: <CAA4eK1LTdwUma_i9=s4-aSkeu+p1cfREMPh6mcayHncN+L=RaQ@mail.gmail.com>
References: <CALdSSPjrLvua14C9ckAYbY5aQXepA56d9gd=1Pv85SmtsPvkjA@mail.gmail.com>
<CAA4eK1KwYxfR7CPLc97vNsQLThOaQsA-GoQCCmjz8s+ORV8caQ@mail.gmail.com>
<20240422162639.68@rfd.leadboat.com>
<CAA4eK1J6OXChcJWV_MDrZSUEwbKs-tfC4Zd_1w7yq06W2t5ZFw@mail.gmail.com>
<20240429212756.60.nmisch@google.com>
<CAA4eK1LTdwUma_i9=s4-aSkeu+p1cfREMPh6mcayHncN+L=RaQ@mail.gmail.com>
On Tue, Apr 30, 2024 at 09:10:52AM +0530, Amit Kapila wrote:
> On Tue, Apr 30, 2024 at 2:58 AM Noah Misch <noah@leadboat.com> wrote:
> > On Mon, Apr 29, 2024 at 10:18:35AM +0530, Amit Kapila wrote:
> > > On Mon, Apr 22, 2024 at 9:56 PM Noah Misch <noah@leadboat.com> wrote:
> >
> > > 3a9b18b309 didn't change the docs of pg_terminate_backend and whatever
> > > is mentioned w.r.t permissions in the doc of that function sounds
> > > valid for drop database force to me. Do you have any specific proposal
> > > in your mind?
> >
> > Something like the attached.
>
> LGTM.
>
> > One could argue the function should also check
> > isBackgroundWorker and ignore even bgworkers that set proc->roleId, but I've
> > not done that.
>
> What is the argument for ignoring such workers?
One of the proposed code comments says, "For bgworker authors, it's convenient
to be able to recommend FORCE if a worker is blocking DROP DATABASE
unexpectedly." That argument is debatable, but I do think it applies equally
to bgworkers whether or not they set proc->roleId.
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: pgsql-hackers@postgresql.org
Cc: noah@leadboat.com, amit.kapila16@gmail.com, reshkekirill@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: TerminateOtherDBBackends code comments inconsistency.
In-Reply-To: <20240430170618.b3.nmisch@google.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox