Re: Shutting down server from a backend process, e.g. walrceiver

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: fazool mein <fazoolmein(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Shutting down server from a backend process, e.g. walrceiver
Date: 2010-09-22 02:50:03
Message-ID: AANLkTikqeVeTcPkDekVcnF9r-5TqtBy6tYksQdBri49S@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Sep 22, 2010 at 2:50 AM, fazool mein <fazoolmein(at)gmail(dot)com> wrote:
> Yes, I'll be modifying the code. In the walreceiver, I used the following to
> send a shutdown to the postmaster:
>
> kill(getppid(), SIGTERM);

You can use the global variable "PostmasterPid" instead of getppid.
There are three types of shutdown. SIGTERM triggers smart shutdown.
Smart shutdown is suitable for your case? If not, you might need to
send SIGINT or SIGQUIT instead.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pei He 2010-09-22 02:58:49 Re: Get the offset of a tuple inside a table
Previous Message Itagaki Takahiro 2010-09-22 02:33:47 Re: Make tuples_per_page pr. table configureable.