> 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')
>
> Comments are welcome.
Anyone has better idea? Tom dislikes my patch but I don't know how to
deal with it.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp