Re: A new function to wait for the backend exit after termination

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: "Hou, Zhijie" <houzj(dot)fnst(at)cn(dot)fujitsu(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Muhammad Usama <m(dot)usama(at)gmail(dot)com>
Subject: Re: A new function to wait for the backend exit after termination
Date: 2020-12-04 06:29:51
Message-ID: CALj2ACVNxfKzwZUZWRKUmVuVuGCOa=CdYz5vNpyk9Q+-jC=j_g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 4, 2020 at 8:44 AM Hou, Zhijie <houzj(dot)fnst(at)cn(dot)fujitsu(dot)com>
wrote:
>
> - however only superusers can terminate superuser backends.
> + however only superusers can terminate superuser backends. When no
> + <parameter>wait</parameter> and <parameter>timeout</parameter>
are
> + provided, only SIGTERM is sent to the backend with the given
process
> + ID and <literal>false</literal> is returned immediately. But the
>
> I test the case when no wait and timeout are provided.
> True is returned as the following which seems different from the doc.
>
> postgres=# select pg_terminate_backend(pid);
> pg_terminate_backend
> ----------------------
> t
> (1 row)
>

Thanks for pointing that out. I reworded that statement. Attaching v5
patch. Please have a look.

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
v5-0001-pg_terminate_backend-with-wait-timeout-and-pg_wai.patch application/octet-stream 10.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2020-12-04 06:32:32 Re: Huge memory consumption on partitioned table with FKs
Previous Message Kyotaro Horiguchi 2020-12-04 06:20:47 Re: Wrong statistics for size of XLOG_SWITCH during pg_waldump.