On Fri, Jan 21, 2011 at 13:56, Tatsuo Ishii <is...@postgresql.org> wrote: >> Here is the patch to implement the feature. >> >> 1) pg_terminate_backend() sends SIGUSR1 signal rather than SIGTERM to >> the target backend. >> 2) The infrastructure used for message passing is >> storage/ipc/procsignal.c The new message type for ProcSignalReason >> is "PROCSIG_TERMNINATE_BACKEND_INTERRUPT" >> 3) I assign new error code 57P04 which is returned from the backend >> killed by pg_terminate_backend(). >> >> #define ERRCODE_TERMINATE_BACKEND MAKE_SQLSTATE('5','7', >> 'P','0','4') > > Anyone has better idea? Tom dislikes my patch but I don't know how to > deal with it.
There was another design in the past discussion: >> One idea is postmaster sets a flag in the shared memory area >> indicating it rceived SIGTERM before forwarding the signal to >> backends. Is it enough for your purpose and do we think it is more robust way? -- Itagaki Takahiro -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers