Re: pg_terminate_backend() issues

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_terminate_backend() issues
Date: 2008-04-15 20:52:40
Message-ID: 6173.1208292760@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Bruce Momjian <bruce(at)momjian(dot)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2008-04-15 21:39:19 pgsql: Re-add terminate TODO item.
Previous Message Bruce Momjian 2008-04-15 20:32:58 pg_terminate_backend() issues

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-04-15 21:55:36 Re: pg_terminate_backend() issues
Previous Message Bruce Momjian 2008-04-15 20:32:58 pg_terminate_backend() issues