mirror of
https://github.com/postgres/postgres.git
synced 2026-05-28 04:35:45 -04:00
Clean up 019_replslot_limit.pl comments
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>
This commit is contained in:
parent
cdb1d1cf1d
commit
0b866bb903
1 changed files with 4 additions and 6 deletions
|
|
@ -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
|
||||
# =============================================================================
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue