From 9bbb65bcd3506beee54324387801a9a8e62e77f1 Mon Sep 17 00:00:00 2001 From: Zsolt Parragi Date: Fri, 2 Oct 2026 22:10:18 +0100 Subject: [PATCH v4] Skip on Windows isolation tests that terminate other backends On Windows, a backend exiting resets its connection, and the client discards any data not yet read, including the FATAL message of a terminated backend. isolationtester polls one connection at a time, so when it waits on a different session the message can get lost, failing the permutation and the tests that run after it. wait_cleanup in injection_points and slot_creation_error in test_decoding have this pattern, and have been failing randomly in the buildfarm. Let's skip them on Windows. Discussion: https://postgr.es/m/088AB35D-0860-494A-A9CF-8B301543AA51@yandex-team.ru --- contrib/test_decoding/Makefile | 7 +++++++ contrib/test_decoding/meson.build | 11 +++++++++-- src/test/modules/injection_points/Makefile | 7 +++++++ src/test/modules/injection_points/meson.build | 11 +++++++++-- 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/contrib/test_decoding/Makefile b/contrib/test_decoding/Makefile index 0111124399a..322e7dc185f 100644 --- a/contrib/test_decoding/Makefile +++ b/contrib/test_decoding/Makefile @@ -31,6 +31,13 @@ include $(top_builddir)/src/Makefile.global include $(top_srcdir)/contrib/contrib-global.mk endif +# slot_creation_error is unstable on Windows, where the FATAL message of a +# terminated backend can get lost. See +# https://postgr.es/m/088AB35D-0860-494A-A9CF-8B301543AA51@yandex-team.ru +ifeq ($(PORTNAME), win32) +ISOLATION := $(filter-out slot_creation_error,$(ISOLATION)) +endif + # But it can nonetheless be very helpful to run tests on preexisting # installation, allow to do so, but only if requested explicitly. installcheck-force: diff --git a/contrib/test_decoding/meson.build b/contrib/test_decoding/meson.build index ac655853d26..08efa7b5d99 100644 --- a/contrib/test_decoding/meson.build +++ b/contrib/test_decoding/meson.build @@ -16,6 +16,14 @@ test_decoding = shared_module('test_decoding', ) contrib_targets += test_decoding +# slot_creation_error is unstable on Windows, where the FATAL message of a +# terminated backend can get lost. See +# https://postgr.es/m/088AB35D-0860-494A-A9CF-8B301543AA51@yandex-team.ru +test_decoding_extra_specs = [] +if host_system != 'windows' + test_decoding_extra_specs += 'slot_creation_error' +endif + tests += { 'name': 'test_decoding', 'sd': meson.current_source_dir(), @@ -62,11 +70,10 @@ tests += { 'subxact_without_top', 'concurrent_stream', 'twophase_snapshot', - 'slot_creation_error', 'skip_snapshot_restore', 'invalidation_distribution', 'parallel_session_origin', - ], + ] + test_decoding_extra_specs, 'regress_args': [ '--temp-config', files('logical.conf'), ], diff --git a/src/test/modules/injection_points/Makefile b/src/test/modules/injection_points/Makefile index 136f0f77951..87528590992 100644 --- a/src/test/modules/injection_points/Makefile +++ b/src/test/modules/injection_points/Makefile @@ -61,3 +61,10 @@ check: endif endif + +# wait_cleanup is unstable on Windows, where the FATAL message of a +# terminated backend can get lost. See +# https://postgr.es/m/088AB35D-0860-494A-A9CF-8B301543AA51@yandex-team.ru +ifeq ($(PORTNAME), win32) +ISOLATION := $(filter-out wait_cleanup,$(ISOLATION)) +endif diff --git a/src/test/modules/injection_points/meson.build b/src/test/modules/injection_points/meson.build index db6b93a8115..dd4e64c2102 100644 --- a/src/test/modules/injection_points/meson.build +++ b/src/test/modules/injection_points/meson.build @@ -26,6 +26,14 @@ test_install_data += files( 'injection_points--1.0.sql', ) +# wait_cleanup is unstable on Windows, where the FATAL message of a +# terminated backend can get lost. See +# https://postgr.es/m/088AB35D-0860-494A-A9CF-8B301543AA51@yandex-team.ru +injection_points_extra_specs = [] +if host_system != 'windows' + injection_points_extra_specs += 'wait_cleanup' +endif + tests += { 'name': 'injection_points', 'sd': meson.current_source_dir(), @@ -56,10 +64,9 @@ tests += { 'ri_fastpath_reindex', 'ri_fastpath_snapshot', 'syscache-update-pruned', - 'wait_cleanup', 'heap_lock_update', 'on_conflict_probe_window', - ], + ] + injection_points_extra_specs, 'runningcheck': false, # see syscache-update-pruned # Some tests wait for all snapshots, so avoid parallel execution 'runningcheck-parallel': false, -- 2.43.0