Re: pg_terminate_backend() issues - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_terminate_backend() issues
Date
Msg-id 6173.1208292760@sss.pgh.pa.us
Whole thread Raw
In response to pg_terminate_backend() issues  (Bruce Momjian <bruce@momjian.us>)
Responses Re: pg_terminate_backend() issues  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: pg_terminate_backend() issues  (Bruce Momjian <bruce@momjian.us>)
Re: pg_terminate_backend() issues  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> Tom Lane wrote:
>> I was able to get things to more or less work most of the time with
>> three or four additional ugly hacks in postgres.c, but I still don't
>> have any great confidence that there aren't windows where a terminate
>> request wouldn't be ignored (even without considering the uncooperative-
>> function scenario).  Moreover it's entirely unclear that this approach
>> actually dodges any of the hypothetical bugs in SIGTERM handling.

> I don't understand.  If we call proc_exit(0) instead, it is the same as
> someone exiting the backend via PQfinish().

Well, using proc_exit() instead of die() might have alleviated that
particular objection, but there are still the others.

>> I think if we want pg_terminate_backend, we have to do it the way that
>> was originally discussed: have it issue SIGTERM and fix whatever needs
>> to be fixed in the SIGTERM code path.

> Well, with no movement on this TODO item since it was removed in 8.0, I
> am willing to give users something that works most of the time.

If the users want it so bad, why has no one stepped up to do the
testing?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: pg_terminate_backend() issues
Next
From: Tom Lane
Date:
Subject: Re: pg_terminate_backend() issues