tests: Fix incompatibility of test_aio with *_FORCE_RELEASE
authorAndres Freund <andres@anarazel.de>
Wed, 2 Apr 2025 11:57:11 +0000 (07:57 -0400)
committerAndres Freund <andres@anarazel.de>
Wed, 2 Apr 2025 11:57:11 +0000 (07:57 -0400)
commita6285b150ad308fbba3ca832fccd199ba38fac60
tree27577816ccf68525a197c66be1a0a0e0f9c4275d
parent43dca8a11624d02dde2b4bd348d77b7045c0dfbc
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
src/test/modules/test_aio/t/001_aio.pl