Fix pq_putmessage_noblock() to not block.
authorTom Lane
Fri, 29 Jul 2016 16:52:57 +0000 (12:52 -0400)
committerTom Lane
Fri, 29 Jul 2016 16:53:02 +0000 (12:53 -0400)
An evident copy-and-pasteo in commit 2bd9e412f 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[email protected]>

src/include/libpq/libpq.h

index efb2dacbba30cf3905b34972d36989010d2385f9..42ab915712cb892877eb760309261f0467dcde7a 100644 (file)
@@ -42,7 +42,7 @@ extern PGDLLIMPORT PQcommMethods *PqCommMethods;
 #define pq_putmessage(msgtype, s, len) \
    (PqCommMethods->putmessage(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_endcopyout(errorAbort) (PqCommMethods->endcopyout(errorAbort))