Re: Streaming Replication patch for CommitFest 2009-09 - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Streaming Replication patch for CommitFest 2009-09
Date
Msg-id 3f0b79eb0909180334j65c0902ved40e2484854e2f@mail.gmail.com
Whole thread Raw
In response to Re: Streaming Replication patch for CommitFest 2009-09  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
Hi,

On Thu, Sep 17, 2009 at 5:08 PM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
> I'm thinking that walreceiver should be a stand-alone program that the
> startup process launches, similar to how it invokes restore_command in
> PITR recovery. Instead of using system(), though, it would use
> fork+exec, and a pipe to communicate.

This approach is OK if the stand-alone walreceiver is treated steadily
by the startup process like a child process under postmaster:

* Handling of some interrupts: SIGHUP, SIGTERM?, SIGINT, SIGQUIT...  For example, the startup process would need to
rethrowwalreceiver  the interrupt from postmaster.
 

* Communication with other child processes: stats collector? syslogger?...  For example, the log message generated by
walreceivershould also  be collected by syslogger if requested.
 

For now, I think that pipe is enough for communication between the
startup process and walreceiver. Though there was the idea to pass
XLOG to the startup process via wal_buffers, in which pipe is not
suitable, I think that is overkill.

Regards,

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


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Streaming Replication patch for CommitFest 2009-09
Next
From: Hans-Juergen Schoenig -- PostgreSQL
Date:
Subject: happy birthday Tom Lane ...