public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tatsuo Ishii <[email protected]>
To: [email protected]
Subject: Re: Feature: add sync message logging to log_per_node_statement and notice_per_node_statement
Date: Mon, 15 Dec 2025 09:18:51 +0900 (JST)
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
> Currently pgpool does not emit logs for a "sync" message when
> log_per_node_statement/notice_per_node_statement enabled. Although
> "sync" is not a query statement, I think a sync message plays
> important role in extended query protocol since it indicates the
> completion of series of extended query protocol messages, and logging
> a sync message is important in a trouble shooting (I myself often
> enable debug message just to know whether a sync message is sent to
> backend or not, but enabling debug message creates lots of noise). So
> I propose to add logging for a sync message for upcoming Pgpool-II
> 4.8.
>
> Comments or suggestions are welcome.
Patch attached.
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
Attachments:
[text/x-patch] log_sync_message.patch (647B, 2-log_sync_message.patch)
download | inline diff:
diff --git a/src/protocol/pool_process_query.c b/src/protocol/pool_process_query.c
index 96334f8e0..0dacbcbc4 100644
--- a/src/protocol/pool_process_query.c
+++ b/src/protocol/pool_process_query.c
@@ -879,6 +879,14 @@ SimpleForwardToBackend(char kind, POOL_CONNECTION *frontend,
pool_write(CONNECTION(backend, i), &kind, 1);
pool_write_and_flush(CONNECTION(backend, i), &sendlen, sizeof(sendlen));
+ /* If sync message, emit log */
+ if (kind == 'S')
+ {
+ char *str = "Sync";
+
+ per_node_statement_log(backend, i, str);
+ per_node_statement_notice(backend, i, str);
+ }
}
}
return POOL_CONTINUE;
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Feature: add sync message logging to log_per_node_statement and notice_per_node_statement
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox