public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tatsuo Ishii <[email protected]>
To: [email protected]
Subject: pgpool: Fix to not call pool_get_transaction_isolation() in elog(DEBUG)
Date: Tue, 19 May 2026 09:21:23 +0000
Message-ID: <[email protected]> (raw)

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 <[email protected]>

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=b4f38129cfe6b97f7a390a0e056f8b43ed5ad...

Modified Files
--------------
src/context/pool_query_context.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)



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: pgpool: Fix to not call pool_get_transaction_isolation() in elog(DEBUG)
  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