Re: Replication server timeout patch - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Replication server timeout patch
Date
Msg-id AANLkTinmDL8pmvjC7sNCmdS5BMjq=F23iTAJtKdnej=N@mail.gmail.com
Whole thread Raw
In response to Re: Replication server timeout patch  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: Replication server timeout patch
List pgsql-hackers
On Wed, Mar 30, 2011 at 4:24 PM, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
>> +       pq_putmessage_noblock('d', msgbuf, 1 +
>> sizeof(WalDataMessageHeader) + nbytes);
>>
>> Don't we need to check the return value of pq_putmessage_noblock? That
>> can return EOF when trouble happens (for example the send system call
>> fails).
>
> No, pq_putmessage_noblock doesn't call send() because it enlarges the buffer
> to make sure the message fits, and it doesn't anything else that could fail
> else. I changed its return type to void, and added an Assert() to check that
> the pq_putmessage() call it does internally indeed doesn't fail.

Oh, you're right.

> Committed with those changes. I also reworded the docs a bit.

Thanks a lot!

+        A value of zero means wait forever.  This parameter can only be set in

The first sentence sounds misleading. Even if you set the parameter to zero,
replication connections can be terminated because of keepalive or socket error.

Regards,

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


pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: pg_last_xlog_receive_location()
Next
From: Simon Riggs
Date:
Subject: Re: Additional options for Sync Replication