From 8aa9e3e0fd3cf7ff475b5adc495e3faf256354e9 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Mon, 5 Oct 2026 11:11:32 +0900 Subject: [PATCH] Skip isolation tests that terminate other backends on Windows 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 (down to v17) and slot_creation_error in test_decoding (down to v15) have this pattern, and have been failing randomly in the buildfarm. Let's skip them on Windows. The cause of the instabilities is proving to be tricky to deal with, pointing for example at 29992a6a509b. This will be tackled later, perhaps with a backpatch (or perhaps with a HEAD-only solution), but it is difficult to be sure at this stage of the work. In theory, a8458f508a7 should make a revert of 29992a6a509b (revert of a revert!) safe on WIN32. Note that 278cdea6b9d2, that has introduced the isolation test slot_creation_error in test_decoding, has mentioned the potential output instability. Author: Zsolt Parragi Author: Michael Paquier Discussion: https://postgr.es/m/CAN4CZFOoiKa9E4Gnh_OzLk3S5Z6RFyg_oY1e_WddCVYhkpTVow@mail.gmail.com Backpatch-through: 15 --- contrib/test_decoding/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/contrib/test_decoding/Makefile b/contrib/test_decoding/Makefile index 02e961f4d31..2f8545eff8c 100644 --- a/contrib/test_decoding/Makefile +++ b/contrib/test_decoding/Makefile @@ -6,9 +6,15 @@ PGFILEDESC = "test_decoding - example of a logical decoding output plugin" REGRESS = ddl xact rewrite toast permissions decoding_in_xact \ decoding_into_rel binary prepared replorigin time messages \ spill slot truncate stream stats twophase twophase_stream + +# slot_creation_error terminates another backend, whose FATAL message can be +# lost on Windows, making the test unstable there. +# See https://postgr.es/m/088AB35D-0860-494A-A9CF-8B301543AA51@yandex-team.ru +SLOT_CREATION_TST = $(if $(filter win32,$(PORTNAME)),,slot_creation_error) + ISOLATION = mxact delayed_startup ondisk_startup concurrent_ddl_dml \ oldest_xmin snapshot_transfer subxact_without_top concurrent_stream \ - twophase_snapshot slot_creation_error catalog_change_snapshot \ + twophase_snapshot $(SLOT_CREATION_TST) catalog_change_snapshot \ skip_snapshot_restore invalidation_distribution REGRESS_OPTS = --temp-config $(top_srcdir)/contrib/test_decoding/logical.conf