Revert changes accidentally included in commit f9521fe4.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Mon, 31 Jan 2022 07:54:44 +0000 (16:54 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Mon, 31 Jan 2022 07:54:44 +0000 (16:54 +0900)
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

index b996cd0a6a4b90878fccc0b78844cb36dcb1aa0d..29acdc7cbbb7713a1c46b33558b20000b1b83625 100644 (file)
@@ -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