Skip site navigation (1) Skip section navigation (2)

How to know killed by pg_terminate_backend

From: Tatsuo Ishii <ishii(at)postgresql(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Subject: How to know killed by pg_terminate_backend
Date: 2010-05-13 00:24:52
Message-ID: 20100513.092452.96760179.t-ishii@sraoss.co.jp (view raw or flat)
Thread:
Lists: pgsql-hackers
Hi,

If a backend killed by pg_terminate_backend(), the backend returns
57P01 which is identical to the one when it's killed by postmaster.

Problem is, pgpool-II needs to trigger failover if postmaster goes
down because apparently pgpool-II cannot use the PostgreSQL server
anymore.

On the otherhand, pg_terminate_backend() just terminates a backend. So
triggering failover is overkill.

Maybe we could make PostgreSQL a little bit smarter so that it returns
a different code than 57P01 when killed by pg_terminate_backend().

Comments?
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

Responses

pgsql-hackers by date

Next:From: Robert HaasDate: 2010-05-13 00:48:41
Subject: Stefan's bug (was: max_standby_delay considered harmful)
Previous:From: Brendan HillDate: 2010-05-13 00:09:03
Subject: Re: Query execution plan from 8.3 -> 8.4

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group