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

From: fazool mein <fazoolmein(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(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 23:28:30
Message-ID: AANLkTim=5BDU101pSKi6YxM7srStV-U_ph8A3qN4RuN2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks for the tips.

In our case, SIGINT makes more sense. I'll use that.

Regards

On Tue, Sep 21, 2010 at 7:50 PM, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:

> 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

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2010-09-22 23:47:12 Re: Git conversion status
Previous Message Marko Tiikkaja 2010-09-22 23:26:45 Re: WIP: Triggers on VIEWs