From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Gregory Stark <stark(at)enterprisedb(dot)com> |
Cc: | "Bruce Momjian" <bruce(at)momjian(dot)us>, "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: pg_terminate_backend() issues |
Date: | 2008-04-16 14:51:22 |
Message-ID: | 7947.1208357482@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>> ISTM that there will be more cases like this in future, so we need a
>> general solution anyway. I propose the following sort of code structure
>> for these situations:
> [We would also have to block SIGTERM around the second cancel_shmem_exit and
> cleanup_routine, no? Or if it's idempotent (actually, wouldn't it have to be?)
> run them in the reverse order.]
No, we wouldn't, because a SIGTERM can only actually fire at a
CHECK_FOR_INTERRUPTS() call. You'd just need to be sure there wasn't
one in the cleanup code.
> Are all the known cases LWLocks?
*None* of the known cases are LWLocks, nor any other resource that we
have generic cleanup code for. The problem cases are one-off resources
that it seemed we could avoid having a real cleanup mechanism for.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Gregory Stark | 2008-04-16 14:57:55 | Re: pg_terminate_backend() issues |
Previous Message | Andrew Dunstan | 2008-04-16 14:24:38 | pgsql: Avoid using unnecessary pgwin32_safestat in libpq. |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-04-16 14:53:02 | Re: pgwin32_safestat weirdness |
Previous Message | Tom Lane | 2008-04-16 14:41:16 | Re: DROP DATABASE vs patch to not remove files right away |