]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Clean up 019_replslot_limit.pl comments
authorAlexander Korotkov <akorotkov@postgresql.org>
Wed, 27 May 2026 00:07:45 +0000 (03:07 +0300)
committerAlexander Korotkov <akorotkov@postgresql.org>
Wed, 27 May 2026 00:09:44 +0000 (03:09 +0300)
Update stale comments and test names in 019_replslot_limit.pl to match
the actual WAL advancement and wal_status checks.  Remove a redundant
standby stop in the inactive_since coverage.

Discussion: https://postgr.es/m/CABPTF7XxDonXAcz6DsN6AUJB3swYrZkJHq3UCDaD3Q2H%2Bj0gUA%40mail.gmail.com
Author: Xuneng Zhou <xunengzhou@gmail.com>
Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com>
src/test/recovery/t/019_replslot_limit.pl

index 882ffb66550148bf4b19b4625742fe4356cffdf6..a412faf51c6a7768cd84aa9a425d1030811a839f 100644 (file)
@@ -60,7 +60,7 @@ $result = $node_primary->safe_psql('postgres',
 );
 is($result, "reserved|t", 'check the catching-up state');
 
-# Advance WAL by five segments (= 5MB) on primary
+# Advance WAL by one segment (= 1MB) on primary
 $node_primary->advance_wal(1);
 $node_primary->safe_psql('postgres', "CHECKPOINT;");
 
@@ -110,7 +110,7 @@ $node_primary->safe_psql('postgres', "CHECKPOINT;");
 $result = $node_primary->safe_psql('postgres',
        "SELECT wal_status FROM pg_replication_slots WHERE slot_name = 'rep1'");
 is($result, "reserved",
-       'check that safe_wal_size gets close to the current LSN');
+       'check that slot remains reserved after advancing WAL');
 
 # The standby can reconnect to primary
 $node_standby->start;
@@ -121,7 +121,7 @@ $node_standby->stop;
 # wal_keep_size overrides max_slot_wal_keep_size
 $result = $node_primary->safe_psql('postgres',
        "ALTER SYSTEM SET wal_keep_size to '8MB'; SELECT pg_reload_conf();");
-# Advance WAL again then checkpoint, reducing remain by 6 MB.
+# Advance WAL again, reducing remain by 6 MB.
 $node_primary->advance_wal(6);
 $result = $node_primary->safe_psql('postgres',
        "SELECT wal_status as remain FROM pg_replication_slots WHERE slot_name = 'rep1'"
@@ -141,7 +141,7 @@ $node_standby->stop;
 # Advance WAL again without checkpoint, reducing remain by 6 MB.
 $node_primary->advance_wal(6);
 
-# Slot gets into 'reserved' state
+# Slot gets into 'extended' state
 $result = $node_primary->safe_psql('postgres',
        "SELECT wal_status FROM pg_replication_slots WHERE slot_name = 'rep1'");
 is($result, "extended", 'check that the slot state changes to "extended"');
@@ -480,8 +480,6 @@ is( $primary4->safe_psql(
        't',
        'last inactive time for an inactive physical slot is updated correctly');
 
-$standby4->stop;
-
 # Testcase end: Check inactive_since property of the streaming standby's slot
 # =============================================================================