From 9e9abed746280086474e2191b8c399b5fd9b0678 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Tue, 7 Apr 2020 19:16:37 -0400 Subject: [PATCH] Remove testing for precise LSN/reserved bytes in new TAP test Trying to ensure that a slot's restart_lsn or amount of reserved bytes exactly match some specific values seems unnecessary, and fragile as shown by failures in multiple buildfarm members. Discussion: https://postgr.es/m/20200407232602.GA21559@alvherre.pgsql --- src/test/recovery/t/019_replslot_limit.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/recovery/t/019_replslot_limit.pl b/src/test/recovery/t/019_replslot_limit.pl index 8a0542e8af..dac8f80096 100644 --- a/src/test/recovery/t/019_replslot_limit.pl +++ b/src/test/recovery/t/019_replslot_limit.pl @@ -121,8 +121,8 @@ $node_standby->stop; advance_wal($node_master, 6); # Slot gets into 'reserved' state -$result = $node_master->safe_psql('postgres', "SELECT restart_lsn, wal_status, pg_size_pretty(restart_lsn - min_safe_lsn) as remain FROM pg_replication_slots WHERE slot_name = 'rep1'"); -is($result, "$start_lsn|reserved|216 bytes", 'check that the slot state changes to "reserved"'); +$result = $node_master->safe_psql('postgres', "SELECT wal_status FROM pg_replication_slots WHERE slot_name = 'rep1'"); +is($result, "reserved", 'check that the slot state changes to "reserved"'); # do checkpoint so that the next checkpoint runs too early $node_master->safe_psql('postgres', "CHECKPOINT;"); @@ -131,8 +131,8 @@ $node_master->safe_psql('postgres', "CHECKPOINT;"); advance_wal($node_master, 1); # Slot gets into 'lost' state -$result = $node_master->safe_psql('postgres', "SELECT restart_lsn, wal_status, min_safe_lsn is NULL FROM pg_replication_slots WHERE slot_name = 'rep1'"); -is($result, "$start_lsn|lost|t", 'check that the slot state changes to "lost"'); +$result = $node_master->safe_psql('postgres', "SELECT wal_status FROM pg_replication_slots WHERE slot_name = 'rep1'"); +is($result, "lost", 'check that the slot state changes to "lost"'); # The standby still can connect to master before a checkpoint $node_standby->start;