pgpool2.git / summary / log / commit / refs
commit b4a788eaeb35b255bc5724ca320670cd92e044fd
Author: Tatsuo Ishii <ishii@sraoss.co.jp>
Date: Mon Jan 31 07:54:44 2022 +0000
Revert changes accidentally included in commit f9521fe4.
Commit f9521fe4 (Implement flush tracking feature) accidentally
included changes for Parameter status change fix patch proposed in
[pgpool-hackers: 4103] Re: What to do with ParamterStatus?
https://www.pgpool.net/pipermail/pgpool-hackers/2022-January/004104.html
A commit should only include single change. Unrelated changes should
not brought in together. So revert the part (Parameter status change
fix).
src/protocol/pool_process_query.c | 20 ++++++--------------
1 file changed, 6 insertions(+), 14 deletions(-)
diff --git a/src/protocol/pool_process_query.c b/src/protocol/pool_process_query.c
index b996cd0a6..29acdc7cb 100644
--- a/src/protocol/pool_process_query.c
+++ b/src/protocol/pool_process_query.c
@@ -3374,7 +3374,7 @@ read_kind_from_backend(POOL_CONNECTION * frontend, POOL_CONNECTION_POOL * backen
errdetail("backend:%d kind:'%c'", i, kind)));
/*
- * Read and forward notice messages to frontend
+ * Read and discard parameter status and notice messages
*/
if (kind == 'N')
{
@@ -3383,23 +3383,17 @@ read_kind_from_backend(POOL_CONNECTION * frontend, POOL_CONNECTION_POOL * backen
pool_process_notice_message_from_one_backend(frontend, backend, i, kind);
}
- /*
- * Read and forward ParameterStatus messages to frontend
- */
else if (kind == 'S')
{
- int len2;
-
pool_read(CONNECTION(backend, i), &len, sizeof(len));
- len2 = len;
len = htonl(len) - 4;
p = pool_read2(CONNECTION(backend, i), len);
if (p)
{
value = p + strlen(p) + 1;
- ereport(LOG,
- (errmsg("ParameterStatus message from backend: %d", i),
- errdetail("parameter name: \"%s\" value: \"%s\"", p, value)));
+ ereport(DEBUG5,
+ (errmsg("reading backend data packet kind"),
+ errdetail("parameter name: %s value: \"%s\"", p, value)));
if (IS_MAIN_NODE_ID(i))
{
@@ -3411,10 +3405,7 @@ read_kind_from_backend(POOL_CONNECTION * frontend, POOL_CONNECTION_POOL * backen
set_application_name_with_string(pool_find_name(&CONNECTION(backend, i)->params, p, &pos));
}
}
- /* forward to frontend */
- pool_write(frontend, &kind, 1);
- pool_write(frontend, &len2, sizeof(len2));
- pool_write_and_flush(frontend, p, len);
+
}
else
{
@@ -3423,6 +3414,7 @@ read_kind_from_backend(POOL_CONNECTION * frontend, POOL_CONNECTION_POOL * backen
errdetail("read from backend failed")));
}
}
+
} while (kind == 'S' || kind == 'N');
#ifdef DEALLOCATE_ERROR_TEST
[parent: 6d513a1b2104]