| From: | Tatsuo Ishii <ishii(at)postgresql(dot)org> |
|---|---|
| To: | pgpool-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgpool: Fix to not call pool_get_transaction_isolation() in elog(DEBUG) |
| Date: | 2026-05-19 09:21:23 |
| Message-ID: | E1wPGdf-00CJm8-1X@gothos.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgpool-committers |
Fix to not call pool_get_transaction_isolation() in elog(DEBUG).
where_to_send_main_replica() and where_to_send_native_replication()
mistakenly called pool_get_transaction_isolation() in
ereport/elog(DEBUG1). Since pool_get_transaction_isolation() issues
do_query() inside, if the code path is executed in an aborted
transaction, do_query() raises a FATAL error. Actually this could
happen when an empty query is executed in an aborted transaction. (DB
applications/drivers issue an empty query to probe whether connection
to pgpool is active or not).
To fix this, simply delete calls to
pool_get_transaction_isolation(). This of course remove the
information from ereport/elog output, I wasn't able to find
alternative way.
Author: Tatsuo Ishii <ishii(at)postgresql(dot)org>
Backpatch-through: v4.5 where where_to_send_main_replica() and
where_to_send_native_replication() are implemented.
Branch
------
master
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=b4f38129cfe6b97f7a390a0e056f8b43ed5adf1d
Modified Files
--------------
src/context/pool_query_context.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tatsuo Ishii | 2026-05-19 12:48:53 | pgpool: Keep local primary_node_id when leader watchdog reports the ini |
| Previous Message | Tatsuo Ishii | 2026-05-19 09:21:18 | pgpool: Fix to not call pool_get_transaction_isolation() in elog(DEBUG) |