pgpool2.git / summary / log / commit / refs
commit b5b69f77591ba5b3b6824e1dd79bb947fa20c8c2
Author: Tatsuo Ishii <ishii@sraoss.co.jp>
Date: Mon Jan 13 13:39:47 2020 +0000
Unbreak notification response message treatment in 4.1.
From 4.1 for an optimization sake SimpleForwardToFrontend() does not
flush most type of messages. However there's an oversight regarding
"notification message" handling. This should have been flushed so that
frontend is immediately notified.
Per bug 573.
src/protocol/pool_process_query.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/protocol/pool_process_query.c b/src/protocol/pool_process_query.c
index 7002ff238..a6470e152 100644
--- a/src/protocol/pool_process_query.c
+++ b/src/protocol/pool_process_query.c
@@ -761,17 +761,18 @@ SimpleForwardToFrontend(char kind, POOL_CONNECTION * frontend,
/*
* Optimization for other than "Command Complete", "Ready For query",
- * "Error response" and "Notice message" messages. Especially, since it
- * is too often to receive and forward "Data Row" message, we do not flush
- * the message to frontend now. We expect that "Command Complete" message
- * (or "Error response" or "Notice response" message) follows the stream
- * of data row message anyway, so flushing will be done at that time.
+ * "Error response" ,"Notice message" and "Notification response"
+ * messages. Especially, since it is too often to receive and forward
+ * "Data Row" message, we do not flush the message to frontend now. We
+ * expect that "Command Complete" message (or "Error response" or "Notice
+ * response" message) follows the stream of data row message anyway, so
+ * flushing will be done at that time.
*
* Same thing can be said to CopyData message. Tremendous number of
* CopyData messages are sent to frontend (typical use case is pg_dump).
* So eliminating per CopyData flush significantly enhances performance.
*/
- if (kind == 'C' || kind == 'Z' || kind == 'E' || kind == 'N')
+ if (kind == 'C' || kind == 'Z' || kind == 'E' || kind == 'N' || kind == 'A')
{
pool_write_and_flush(frontend, p1, len1);
}
[parent: e1a9ec64a302]