pgsql: tests: Fix incompatibility of test_aio with *_FORCE_RELEASE

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: tests: Fix incompatibility of test_aio with *_FORCE_RELEASE
Date: 2025-04-02 12:31:02
Message-ID: E1tzxFG-002Hsa-2C@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

tests: Fix incompatibility of test_aio with *_FORCE_RELEASE

The test added in 93bc3d75d8e failed in a build with RELCACHE_FORCE_RELEASE
and CATCACHE_FORCE_RELEASE defined. The test intentionally forgets to exit
batchmode - normally that would trigger an error at the end of the
transaction, which the test verifies. However, with RELCACHE_FORCE_RELEASE
and CATCACHE_FORCE_RELEASE defined, we get other code (output function lookup)
entering batchmode and erroring out because batchmode isn't allowed to be
entered recursively.

Fix that by changing the queries in question to not output any rows. That's
not exactly pretty, but seems to avoid the problem reliably.

Eventually we might want to make RELCACHE_FORCE_RELEASE and
CATCACHE_FORCE_RELEASE GUCs, so we can disable them where necessary - this
isn't the first test having difficulty with those debug options. But that's
for later.

Per buildfarm member prion.

Discussion: https://postgr.es/m/uc62i6vi5gd4bi6wtjj5poadqxolgy55e7ihkmf3mthjegb6zl@zqo7xez7sc2r

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a6285b150ad308fbba3ca832fccd199ba38fac60

Modified Files
--------------
src/test/modules/test_aio/t/001_aio.pl | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andrew Dunstan 2025-04-02 12:34:11 Re: TEMP_CONFIG vs test_aio
Previous Message Andres Freund 2025-04-02 11:55:06 pgsql: tests: Cope with WARNINGs during failed CREATE DB on windows