Re: A new function to wait for the backend exit after termination - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: A new function to wait for the backend exit after termination
Date
Msg-id CABUevEwL7-3r=59Wdkq3y_W_6PxUpqKhnphYuh=VG9A-rdEamw@mail.gmail.com
Whole thread Raw
In response to Re: A new function to wait for the backend exit after termination  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Responses Re: A new function to wait for the backend exit after termination  (Noah Misch <noah@leadboat.com>)
List pgsql-hackers
On Mon, Apr 5, 2021 at 5:21 AM Bharath Rupireddy
<bharath.rupireddyforpostgres@gmail.com> wrote:
>
> On Fri, Mar 19, 2021 at 11:37 AM Bharath Rupireddy
> <bharath.rupireddyforpostgres@gmail.com> wrote:
> > Attaching v11 patch that removed the wait boolean flag in the
> > pg_terminate_backend and timeout 0 indicates "no wait", negative value
> > "errors out", positive value "waits for those many milliseconds". Also
> > addressed other review comments that I received upthread. Please
> > review v11 further.
>
> Attaching v12 patch after rebasing onto the latest master.

I've applied this patch with some minor changes.

I rewrote some parts of the documentation to make it more focused on
the end user rather than the implementation. I also made a small
simplification in pg_terminate_backend() which removes the "wait"
variable (seems like a bit of a leftover since the time when it was a
separate argument). And picked a correct oid for the function (oids
8000-9999 should be used for new patches, 16386 is in the user area of
oids)

Thanks!

-- 
 Magnus Hagander
 Me: https://www.hagander.net/
 Work: https://www.redpill-linpro.com/



pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: TRUNCATE on foreign table
Next
From: Thomas Munro
Date:
Subject: Re: Remove page-read callback from XLogReaderState.