From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Re: [COMMITTERS] pgsql: Add pg_terminate_backend() to allow terminating only a single |
Date: | 2008-04-15 20:20:26 |
Message-ID: | 5115.1208290826@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
I wrote:
> All in all, this patch wasn't ready to apply without review. I'm
> currently looking to see whether it's salvageable or not.
After further study, I've concluded that it is in fact not salvageable,
and I respectfully request that it be reverted.
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.
Given the complexity that it adds, I think it's fair to say that this
approach is probably buggier than the other way.
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. As the TODO list used to say
before it got editorialized upon, this is mostly a matter of testing
(something that I can tell this patch was sadly lacking :-().
We do need also to go around and fix any places that think a PG_TRY
block is a sufficient way to clean up state in shared memory --- cf
this AFAIK-still-unfixed bug:
http://archives.postgresql.org/pgsql-hackers/2007-04/msg00218.php
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2008-04-15 20:28:47 | pgsql: Revert addition of pg_terminate_backend() because of race |
Previous Message | Bruce Momjian | 2008-04-15 19:34:49 | Re: Re: [COMMITTERS] pgsql: Add pg_terminate_backend() to allow terminating only a single |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2008-04-15 20:32:58 | pg_terminate_backend() issues |
Previous Message | Zdenek Kotala | 2008-04-15 20:16:50 | Re: Commit fest queue |