Skip to content

Commit 33dccad

Browse files
committed
enable PQ_NOTIFY_PATCH in config.h
1 parent bbebcb1 commit 33dccad

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/include/config.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,20 @@ query commands and causes a SIGSEGV trying to execute commands without plan.
7777
*/
7878
#define FUNC_UTIL_PATCH
7979

80+
/*
81+
82+
Async notifies received while a backend is in the middle of a begin/end
83+
transaction block are lost by libpq when the final end command is issued.
84+
85+
The bug is in the routine PQexec of libpq. The routine throws away any
86+
message from the backend when a message of type 'C' is received. This
87+
type of message is sent when the result of a portal query command with
88+
no tuples is returned. Unfortunately this is the case of the end command.
89+
As all async notification are sent only when the transaction is finished,
90+
if they are received in the middle of a transaction they are lost in the
91+
libpq library. I added some tracing code to PQexec and this is the output:
92+
93+
*/
94+
#define PQ_NOTIFY_PATCH
8095
#endif /* CONFIG_H */
8196

0 commit comments

Comments
 (0)