Re: Wrong defeinition of pq_putmessage_noblock since 9.5

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: Wrong defeinition of pq_putmessage_noblock since 9.5
Дата
Msg-id CAHGQGwFMUTf-M6E4VKFdOPX8fBUn9rjCbJw3fcBcO9qj6_S8-w@mail.gmail.com
обсуждение исходный текст
Ответ на Wrong defeinition of pq_putmessage_noblock since 9.5  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Ответы Re: Wrong defeinition of pq_putmessage_noblock since 9.5  (Fujii Masao <masao.fujii@gmail.com>)
Список pgsql-hackers
On Thu, Jul 28, 2016 at 6:52 PM, Kyotaro HORIGUCHI
<horiguchi.kyotaro@lab.ntt.co.jp> wrote:
> Hello,
>
> While testing replication for 9.5, we found that repl-master can
> ignore wal_sender_timeout and seemingly waits for TCP
> retransmission timeout for the case of sudden power-off of a
> standby.
>
> My investigation told me that the immediate cause could be that
> secure_write() is called with *blocking mode* (that is,
> port->noblock = false) under *pq_putmessage_noblock* macro called
> from XLogSendPhysical().
>
> libpq.h of 9.5 and newer defines it as the following,
>
>> #define pq_putmessage(msgtype, s, len) \
>>       (PqCommMethods->putmessage(msgtype, s, len))
>> #define pq_putmessage_noblock(msgtype, s, len) \
>>       (PqCommMethods->putmessage(msgtype, s, len))
>
> which is apparently should be the following.
>
>> #define pq_putmessage_noblock(msgtype, s, len) \
>>       (PqCommMethods->putmessage_noblock(msgtype, s, len))
>
> The attached patch fixes it.

Good catch! Barring objection, I will push this to both master and 9.5.

Regards,

-- 
Fujii Masao



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: pg_basebackup wish list
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: Wrong defeinition of pq_putmessage_noblock since 9.5