Re: How to know killed by pg_terminate_backend - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: How to know killed by pg_terminate_backend
Date
Msg-id 20110121.135645.787670930791286932.t-ishii@sraoss.co.jp
Whole thread Raw
In response to Re: How to know killed by pg_terminate_backend  (Tatsuo Ishii <ishii@sraoss.co.jp>)
Responses Re: How to know killed by pg_terminate_backend  (Itagaki Takahiro <itagaki.takahiro@gmail.com>)
List pgsql-hackers
> 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


pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: Error code for "terminating connection due to conflict with recovery"
Next
From: KaiGai Kohei
Date:
Subject: Re: sepgsql contrib module