Re: Replication server timeout patch

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: Replication server timeout patch
Дата
Msg-id AANLkTinmDL8pmvjC7sNCmdS5BMjq=F23iTAJtKdnej=N@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Replication server timeout patch  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Ответы Re: Replication server timeout patch  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список 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 по дате отправления:

Предыдущее
От: Tatsuo Ishii
Дата:
Сообщение: Re: pg_last_xlog_receive_location()
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Additional options for Sync Replication