public inbox for [email protected]help / color / mirror / Atom feed
Feature: add sync message logging to log_per_node_statement and notice_per_node_statement 3+ messages / 1 participants [nested] [flat]
* Feature: add sync message logging to log_per_node_statement and notice_per_node_statement @ 2025-12-14 13:02 Tatsuo Ishii <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: Tatsuo Ishii @ 2025-12-14 13:02 UTC (permalink / raw) To: [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. -- Tatsuo Ishii SRA OSS K.K. English: http://www.sraoss.co.jp/index_en/ Japanese:http://www.sraoss.co.jp ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Feature: add sync message logging to log_per_node_statement and notice_per_node_statement @ 2025-12-15 00:18 Tatsuo Ishii <[email protected]> parent: Tatsuo Ishii <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: Tatsuo Ishii @ 2025-12-15 00:18 UTC (permalink / raw) To: [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; ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Feature: add sync message logging to log_per_node_statement and notice_per_node_statement @ 2025-12-17 02:24 Tatsuo Ishii <[email protected]> parent: Tatsuo Ishii <[email protected]> 0 siblings, 0 replies; 3+ messages in thread From: Tatsuo Ishii @ 2025-12-17 02:24 UTC (permalink / raw) To: [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. Patch pushed to master branch. Thanks. -- Tatsuo Ishii SRA OSS K.K. English: http://www.sraoss.co.jp/index_en/ Japanese:http://www.sraoss.co.jp ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2025-12-17 02:24 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-12-14 13:02 Feature: add sync message logging to log_per_node_statement and notice_per_node_statement Tatsuo Ishii <[email protected]> 2025-12-15 00:18 ` Tatsuo Ishii <[email protected]> 2025-12-17 02:24 ` Tatsuo Ishii <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox