Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gWGKb-0003lT-ET for pgsql-general@arkaria.postgresql.org; Mon, 10 Dec 2018 07:50:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gWGKX-0004bn-P0 for pgsql-general@arkaria.postgresql.org; Mon, 10 Dec 2018 07:50:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gWGKX-0004Wj-Cy for pgsql-general@lists.postgresql.org; Mon, 10 Dec 2018 07:50:17 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gWGKM-0002Vw-Hv for pgsql-general@lists.postgresql.org; Mon, 10 Dec 2018 07:50:13 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id E959F21D17D1; Mon, 10 Dec 2018 10:50:04 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=x tagged_above=-99 required=4 WHITELISTED tests=[] autolearn=unavailable Received: from [192.168.27.237] (gw.postgrespro.ru [93.174.131.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id B2CC421D17CF; Mon, 10 Dec 2018 10:50:04 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1544428204; bh=LMS+u+7xovGgLdbIppYdQjWNSRZIi5bYg9Bq9cHQZ80=; h=Subject:To:References:From:Date:In-Reply-To; b=UOX8zW4hIAm+shSQ+oPD1eM6gujw7eo5Rjct4KkkRoXpDEZqXWlX5tyu4ccZKjLAn Y/HDXo3TJqS5sLGr9F7Zj5L7lZ8n6eKa2i+JEEuK7NuZf1RjjUO3ha6cP5NDn+7ahc dLZcSM+8RpgBs0nlJElsiZK3TE65wCwKBOGdJ6Jc= Subject: Re: pg_ctl kill INT vs. pg_cancel_backend To: Ron , pgsql-general@lists.postgresql.org References: <08cc3e1f-9a93-3119-f828-fb6072e82a1c@gmail.com> From: Arthur Zakirov Message-ID: <008ed6df-38ce-9cec-bfdd-e7ba50189545@postgrespro.ru> Date: Mon, 10 Dec 2018 10:50:04 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.2 MIME-Version: 1.0 In-Reply-To: <08cc3e1f-9a93-3119-f828-fb6072e82a1c@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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