From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] Terminating a backend |
Date: | 2008-04-12 14:04:09 |
Message-ID: | 200804121404.m3CE49419634@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Bruce Momjian wrote:
> I have an idea for this TODO item:
>
> * Allow administrators to safely terminate individual sessions either
> via an SQL function or SIGTERM
>
> Lock table corruption following SIGTERM of an individual backend
> has been reported in 8.0. A possible cause was fixed in 8.1, but
> it is unknown whether other problems exist. This item mostly
> requires additional testing rather than of writing any new code.
>
> http://archives.postgresql.org/pgsql-hackers/2006-08/msg00174.php
>
> When we get the termination signal, why can't we just set a global
> boolean, do a query cancel, and in the setjmp() code block check the
> global and exit --- at that stage we know we have released all locks and
> can exit cleanly.
I have implemented this idea with the attached patch.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Attachment | Content-Type | Size |
---|---|---|
/rtmp/diff | text/x-diff | 10.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Simone Campora | 2008-04-12 15:18:22 | runtime error on SPGIST, needed help |
Previous Message | Heikki Linnakangas | 2008-04-12 13:02:49 | Re: Free Space Map data structure |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2008-04-12 15:32:00 | Re: [HACKERS] Terminating a backend |
Previous Message | Andrew Chernow | 2008-04-12 13:37:24 | Re: libpq patch for pqtypes hook api and PGresult creation |