| From: | Tatsuo Ishii <ishii(at)postgresql(dot)org> |
|---|---|
| To: | koshino(at)sraoss(dot)co(dot)jp |
| Cc: | pgpool-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: [PATCH v1] Fix hang on deferred constraint errors in pipeline mode |
| Date: | 2026-08-27 00:01:29 |
| Message-ID: | 20260827.090129.1762335251349108179.ishii@postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgpool-hackers |
Thank you for the patch!
> Hi,
>
> When PostgreSQL 19's psql_pipeline regression test is run through
> Pgpool-II,
> it can hang after a deferred constraint violation is
> reported at commit time.
>
> The attached patch fixes the issue by keeping the pending Sync message
> in the queue when an ErrorResponse is received,
> allowing processing to
> continue through ReadyForQuery.
>
> I have confirmed that the patch applies to
> master and V4_7_STABLE through V4_3_STABLE.
The patch looks good to me. One request: can you consider to add a
regression test for this? The patched module is one of the critical
part of Pgpool-II. We want to detect a regression as early as possible
in the event of other modifications to the function.
Here is a test case using pgproto.
'Q' "DROP TABLE psql_pipeline_defer"
'Y'
'Q' "CREATE TABLE psql_pipeline_defer (a INTEGER PRIMARY KEY DEFERRABLE INITIALLY DEFERRED)"
'Y'
'P' "" "INSERT INTO psql_pipeline_defer VALUES (1),(1) RETURNING *"
'B' "" "" 0 0 0
'D' 'P' ""
'E' "" 0
'S'
'Y'
'X'
To detect the hang, you could use "timeout 1 pgproto...".
See src/test/regression/tests/006.memqcache/test.sh for similar idea.
Regards,
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tatsuo Ishii | 2026-08-27 04:08:14 | Re: Delimit query-cache key to prevent collisions |
| Previous Message | Tatsuo Ishii | 2026-08-26 23:48:42 | Re: Stricter check for frontend message kind |