pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: test_aio: Fix broken error recovery assertions in 001_aio
Date: Thu, 20 Aug 2026 22:05:49 +0000
Message-ID: <E1wxAtQ-00000001Pmx-1IGe@gemulon.postgresql.org> (raw)

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@jeltef.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(-)



view thread (3+ messages)

Message-ID: <E1wxAtQ-00000001Pmx-1IGe@gemulon.postgresql.org>
Permalink:  ../E1wxAtQ-00000001Pmx-1IGe@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wxAtQ-00000001Pmx-1IGe@gemulon.postgresql.org

 · 

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: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: test_aio: Fix broken error recovery assertions in 001_aio
  In-Reply-To: <E1wxAtQ-00000001Pmx-1IGe@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox