diff --git a/test/test_pghoard.py b/test/test_pghoard.py index 968aa6d8..3bd5a101 100644 --- a/test/test_pghoard.py +++ b/test/test_pghoard.py @@ -604,8 +604,6 @@ def test_pause_on_disk_full(self, db, pghoard_separate_volume, caplog): # MiB so if logic for automatically suspending pg_receive(xlog|wal) wasn't working the volume # would certainly fill up and the files couldn't be processed. Now this should work fine. for _ in range(16): - # Note: do not combine two function call in one select, PG executes it differently and - # sometimes looks like it generates less WAL files than we wanted switch_wal(conn) conn.close() diff --git a/test/util.py b/test/util.py index 39939647..d3f0df2e 100644 --- a/test/util.py +++ b/test/util.py @@ -24,6 +24,8 @@ def switch_wal(connection): cur = connection.cursor() # Force allocating a XID, otherwise if there was no activity we will # stay on the same WAL + # Note: do not combine two function call in one select, PG executes it differently and + # sometimes looks like it generates less WAL files than we wanted cur.execute("SELECT txid_current()") if connection.server_version >= 100000: cur.execute("SELECT pg_switch_wal()")