From 7e713c6c0b2ab89cdafb4b428ec248fa7556b15b Mon Sep 17 00:00:00 2001 From: Alexander Olekhnovich Date: Fri, 19 Aug 2022 09:39:05 +0200 Subject: [PATCH] Fix for flaky test_pause_on_disk_full --- test/util.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/util.py b/test/util.py index d3f0df2e..7c49e3a9 100644 --- a/test/util.py +++ b/test/util.py @@ -31,4 +31,9 @@ def switch_wal(connection): cur.execute("SELECT pg_switch_wal()") else: cur.execute("SELECT pg_switch_xlog()") + # This should fix flaky tests, which expect a specific number of WAL files which never arrive. + # Quite often the last WAL would not be finalized by walreceiver unless there is some extra activity after + # switching, the bug should be fixed in PG 15 + # https://github.com/postgres/postgres/commit/596ba75cb11173a528c6b6ec0142a282e42b69ec + cur.execute("SELECT txid_current()") cur.close()