Re: Walsender process patch v1 for Synch Rep

From: "Fujii Masao" <masao(dot)fujii(at)gmail(dot)com>
To: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Cc: "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Walsender process patch v1 for Synch Rep
Date: 2008-11-14 10:36:18
Message-ID: 3f0b79eb0811140236k5c9e4af1re3b9f973116ac07e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 11, 2008 at 9:12 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
>
> On Mon, 2008-11-10 at 18:22 +0900, Fujii Masao wrote:
>
>> Yeah, I also add walsender as new auxiliary process at first. But,
>> during coding,
>> I made out that this is more complicated for code and user.
>>
>> First problem : Which process accepts the connection from standby?
>> IMO, *postmaster* should accept it like normal database access. Since
>> we
>> can use the existing connection establishment logic, the change of the
>> code
>> is smaller and it's easier to use. So, I added walsender as a special
>> backend
>> which is forked when standby connects to postmaster. Is there any
>> advantage
>> which walsender or other processes accept the connection from standby?
>
>> Second problem : What should walsender do after the termination of the
>> connection from standby? should die?, or remain alive and wait for
>> next
>> connection? IMO, we should handle it like normal database access, i.e.
>> exit walsender. This and adding walsender as an auxiliary process
>> seldom
>> meet, I think.
>>
>> Does that answer you? Am I missing something?
>
> It's good to see your reasons written down.
>
> OK, I think I could like this way around. The "walsender" database
> allows us to enforce restrictions in pg_hba.conf. Also avoids needing to
> run a long running transaction to initiate wal sending feature, if we do
> it just with user function. I'd like to see a longer README explaining
> these design aspects though.

OK, thanks. I'll try to write them.

--
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 Richard Huxton 2008-11-14 10:47:46 Re: Simple postgresql.conf wizard
Previous Message Martijn van Oosterhout 2008-11-14 10:23:32 Re: Block-level CRC checks