Re: How to know killed by pg_terminate_backend - Mailing list pgsql-hackers

From Tom Lane
Subject Re: How to know killed by pg_terminate_backend
Date
Msg-id 10300.1295624146@sss.pgh.pa.us
Whole thread Raw
In response to Re: How to know killed by pg_terminate_backend  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
Responses Re: How to know killed by pg_terminate_backend  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Itagaki Takahiro <itagaki.takahiro@gmail.com> writes:
> On Fri, Jan 21, 2011 at 13:56, Tatsuo Ishii <ishii@postgresql.org> wrote:
>> Anyone has better idea? Tom dislikes my patch but I don't know how to
>> deal with it.

> There was another design in the past discussion:
> One idea is postmaster sets a flag in the shared memory area
> indicating it rceived SIGTERM before forwarding the signal to
> backends.

> Is it enough for your purpose and do we think it is more robust way?

To put this as briefly as possible: I don't want to add even one line of
code to distinguish pg_terminate_backend from database-wide shutdown.
That function should be a last-ditch tool, not something used on a daily
basis.  So I disagree with the premise as much as with any particular
implementation.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: pg_dump directory archive format / parallel pg_dump
Next
From: Robert Haas
Date:
Subject: Re: SSI and Hot Standby