| 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:06 |
| Message-ID: | E1wPGdO-00CJgC-1C@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
------
V4_5_STABLE
Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=ed230ec5fa7d1832b4fd4abe1d294e20f2d59892
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 09:21:12 | pgpool: Fix to not call pool_get_transaction_isolation() in elog(DEBUG) |
| Previous Message | Tatsuo Ishii | 2026-05-19 06:16:25 | pgpool: Fix empty query case in aborted transaction. |