From: | Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Wrong defeinition of pq_putmessage_noblock since 9.5 |
Date: | 2016-07-28 09:52:28 |
Message-ID: | 20160728.185228.58375982.horiguchi.kyotaro@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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.
regards,
--
Kyotaro Horiguchi
NTT Open Source Software Center
Attachment | Content-Type | Size |
---|---|---|
0001-Fix-the-defeinition-of-pq_putmessage_noblock-macro.patch | text/x-patch | 1.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro HORIGUCHI | 2016-07-28 10:21:00 | Re: pg_upgrade: exit_hook_registered variable |
Previous Message | Artur Zakirov | 2016-07-28 08:23:42 | pg_upgrade: exit_hook_registered variable |