From: Arthur Zakirov <a.zakirov@postgrespro.ru>
To: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: pg_ctl kill INT vs. pg_cancel_backend
Date: Mon, 10 Dec 2018 10:50:04 +0300
Message-ID: <008ed6df-38ce-9cec-bfdd-e7ba50189545@postgrespro.ru> (raw)
In-Reply-To: <08cc3e1f-9a93-3119-f828-fb6072e82a1c@gmail.com>
References: <08cc3e1f-9a93-3119-f828-fb6072e82a1c@gmail.com>
Hello,
On 08.12.2018 20:30, Ron wrote:
> Hi,
>
> Is there a substantive difference between the two, or are they just
> different interfaces to the same action?
I think they both only execute kill() and send a signal to a process.
But pg_cancel_backend() after checking privileges sends only SIGINT and
only to a PostgreSQL's backend process.
pg_ctl can send a specified signal to any process. From the documentation:
pg_ctl kill signal_name process_id
Here signal_name is HUP, INT and others.
--
Arthur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: a.zakirov@postgrespro.ru, ronljohnsonjr@gmail.com
Subject: Re: pg_ctl kill INT vs. pg_cancel_backend
In-Reply-To: <008ed6df-38ce-9cec-bfdd-e7ba50189545@postgrespro.ru>
References: <08cc3e1f-9a93-3119-f828-fb6072e82a1c@gmail.com> <008ed6df-38ce-9cec-bfdd-e7ba50189545@postgrespro.ru>
* 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