| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: test_aio: Fix broken error recovery assertions in 001_aio |
| Date: | 2026-08-20 22:05:49 |
| Message-ID: | E1wxAtQ-00000001Pmx-1IGe@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
test_aio: Fix broken error recovery assertions in 001_aio
The three error recovery checks in `test_handle()` used "qr/^|ok$/" to
look for the marker "ok" in psql's output. '^' matches every string, so
the assertions passed no matter what psql printed.
Spelling the regex correctly as "qr/^ok\|$/" exposed that the explicit
xact case was actually failing, reporting an incorrect "current
transaction is aborted" instead of showing that an AIO handle can be
acquired again after an error. This is rewritten with a ROLLBACK,
similarly to the subxact counterpart.
While on it, the subxact case had no marker column in its query, so add
one there for consistency, and reformat to use same pattern.
Author: Jelte Fennema-Nio <me(at)jeltef(dot)nl>
Discussion: https://postgr.es/m/DKSU6GI1YLG5.3VF6M4IRKQ7XE@jeltef.nl
Backpatch-through: 18
Branch
------
REL_19_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/86ed13547589d8401b3b1e1ec2873903b287cb80
Modified Files
--------------
src/test/modules/test_aio/t/001_aio.pl | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2026-08-20 22:51:52 | pgsql: Improve error for RETURNING with system columns under rules |
| Previous Message | Jeff Davis | 2026-08-20 21:07:06 | pgsql: hashtext: fix fragile code. |