| From: | Koshino Taiki <koshino(at)sraoss(dot)co(dot)jp> |
|---|---|
| To: | "pgpool-hackers(at)lists(dot)postgresql(dot)org" <pgpool-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Fix internal transaction handling in raw mode |
| Date: | 2026-09-08 07:27:10 |
| Message-ID: | OS9P286MB6486FEDC0D1A0BEA0E5F4B5494B12@OS9P286MB6486.JPNP286.PROD.OUTLOOK.COM |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgpool-hackers |
Hi,
This issue was reported in GitHub issue #172:
https://github.com/pgpool/pgpool2/issues/172
I reproduced the problem where an autocommitted extended-protocol UPDATE
in raw mode leaves the backend in an open transaction. The UPDATE
completes successfully, but Pgpool-II returns `ReadyForQuery(T)` and the
backend remains in `idle in transaction`.
The cause is that Parse() starts an internal transaction for strict queries
in raw mode, while ReadyForQuery() does not close it. Bind() already limits
this behavior to replication mode.
This patch adds the same `REPLICATION` condition to Parse():
if (REPLICATION && is_strict_query(...))
After the fix, Pgpool-II returns `ReadyForQuery(I)`.
The patch applies to the master branch and was verified with pgproto.
Best Regards,
Taiki Koshino
Taiki Koshino<koshino(at)sraoss(dot)co(dot)jp>
SRA OSS K.K.
TEL: 03-5979-2701 FAX: 03-5979-2702
URL: https://www.sraoss.co.jp/
| Attachment | Content-Type | Size |
|---|---|---|
| v1-0001-Fix-inconsistent-internal-transaction-handling-in.patch | application/octet-stream | 2.1 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tatsuo Ishii | 2026-09-09 04:08:54 | Re: Proposal: PCP command for watchdog leader switchover (TODO: "Pgpool-II leader node switchover") |
| Previous Message | Ernesto Montilva | 2026-09-07 14:59:56 | 50-60ms per-query overhead in PgPool-II 4.7 vs direct connection |