Re: pg_terminate_backend() issues
| От | Tom Lane |
|---|---|
| Тема | Re: pg_terminate_backend() issues |
| Дата | |
| Msg-id | 7947.1208357482@sss.pgh.pa.us обсуждение |
| Ответ на | Re: pg_terminate_backend() issues (Gregory Stark <stark@enterprisedb.com>) |
| Ответы |
Re: pg_terminate_backend() issues
|
| Список | pgsql-hackers |
Gregory Stark <stark@enterprisedb.com> writes:
> "Tom Lane" <tgl@sss.pgh.pa.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
В списке pgsql-hackers по дате отправления: