Skip to content

Commit

Permalink
Move the comment to a proper place
Browse files Browse the repository at this point in the history
  • Loading branch information
alexole committed Aug 18, 2022
1 parent 2610a30 commit 55a4886
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions test/test_pghoard.py
Expand Up @@ -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()

Expand Down
2 changes: 2 additions & 0 deletions test/util.py
Expand Up @@ -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()")
Expand Down

0 comments on commit 55a4886

Please sign in to comment.