Commit 80b346c2 authored by Tom Lane's avatar Tom Lane

Fix pq_putmessage_noblock() to not block.

An evident copy-and-pasteo in commit 2bd9e412 broke the non-blocking
aspect of pq_putmessage_noblock(), causing it to behave identically to
pq_putmessage().  That function is nowadays used only in walsender.c,
so that the net effect was to cause walsenders to hang up waiting for
the receiver in situations where they should not.

Kyotaro Horiguchi

Patch: <20160728.185228.58375982.horiguchi.kyotaro@lab.ntt.co.jp>
parent 3153b1a5
...@@ -43,7 +43,7 @@ extern PGDLLIMPORT PQcommMethods *PqCommMethods; ...@@ -43,7 +43,7 @@ extern PGDLLIMPORT PQcommMethods *PqCommMethods;
#define pq_putmessage(msgtype, s, len) \ #define pq_putmessage(msgtype, s, len) \
(PqCommMethods->putmessage(msgtype, s, len)) (PqCommMethods->putmessage(msgtype, s, len))
#define pq_putmessage_noblock(msgtype, s, len) \ #define pq_putmessage_noblock(msgtype, s, len) \
(PqCommMethods->putmessage(msgtype, s, len)) (PqCommMethods->putmessage_noblock(msgtype, s, len))
#define pq_startcopyout() (PqCommMethods->startcopyout()) #define pq_startcopyout() (PqCommMethods->startcopyout())
#define pq_endcopyout(errorAbort) (PqCommMethods->endcopyout(errorAbort)) #define pq_endcopyout(errorAbort) (PqCommMethods->endcopyout(errorAbort))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment