aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2025-04-02 07:08:10 -0400
committerAndres Freund <andres@anarazel.de>2025-04-02 07:51:48 -0400
commit43dca8a11624d02dde2b4bd348d77b7045c0dfbc (patch)
tree3da45835883b77cb1c7e633c29971a255088d0d8 /src
parenteec0040c4bcd650993bb058ebdf61ab94171fda4 (diff)
downloadpostgresql-43dca8a11624d02dde2b4bd348d77b7045c0dfbc.tar.gz
postgresql-43dca8a11624d02dde2b4bd348d77b7045c0dfbc.zip
tests: Cope with WARNINGs during failed CREATE DB on windows
The test added in 93bc3d75d8e sometimes fails on windows, due to warnings like WARNING: some useless files may be left behind in old database directory "base/16514" The reason for that is createdb_failure_callback() does not ensure that there are no open file descriptors for files in the partially created, to-be-dropped, database. We do take care in dropdb(), but that involves waiting for checkpoints and a ProcSignalBarrier, which we probably don't want to do in an error callback. This should probably be fixed one day, but for now 001_aio.pl needs to cope. Per buildfarm animals fairywren and drongo. Discussion: https://postgr.es/m/uc62i6vi5gd4bi6wtjj5poadqxolgy55e7ihkmf3mthjegb6zl@zqo7xez7sc2r
Diffstat (limited to 'src')
-rw-r--r--src/test/modules/test_aio/t/001_aio.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/test/modules/test_aio/t/001_aio.pl b/src/test/modules/test_aio/t/001_aio.pl
index e8d064ecd8d..ff5f2219d0a 100644
--- a/src/test/modules/test_aio/t/001_aio.pl
+++ b/src/test/modules/test_aio/t/001_aio.pl
@@ -1279,6 +1279,11 @@ STRATEGY wal_log;
# Verify that CREATE DATABASE of an invalid database fails and is
# accounted for accurately.
+ #
+ # Note: On windows additional WARNING messages might be printed, due to
+ # "some useless files may be left behind" warnings. While we probably
+ # should prevent those from occurring, they're independent of AIO, so we
+ # shouldn't fail because of them here.
my ($cs_count_before, $cs_ts_before) =
checksum_failures($psql, 'regression_createdb_source');
psql_like(
@@ -1287,7 +1292,7 @@ STRATEGY wal_log;
"create database w/ wal strategy, invalid source",
$createdb_sql,
qr/^$/,
- qr/^psql:<stdin>:\d+: ERROR: invalid page in block 1 of relation base\/\d+\/\d+$/
+ qr/psql:<stdin>:\d+: ERROR: invalid page in block 1 of relation base\/\d+\/\d+$/
);
my ($cs_count_after, $cs_ts_after) =
checksum_failures($psql, 'regression_createdb_source');