Terminating a backend - Mailing list pgsql-hackers

From Bruce Momjian
Subject Terminating a backend
Date
Msg-id 200803070121.m271Li315581@momjian.us
Whole thread Raw
Responses Re: Terminating a backend  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Terminating a backend  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
I have an idea for this TODO item:
* Allow administrators to safely terminate individual sessions either  via an SQL function or SIGTERM  Lock table
corruptionfollowing 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
newcode.  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.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://postgres.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Idle idea for a feature
Next
From: Tom Lane
Date:
Subject: Re: Terminating a backend