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
This commit is contained in:
Alvaro Herrera 2020-04-07 19:16:37 -04:00
parent 3985b600f5
commit 9e9abed746
No known key found for this signature in database
GPG Key ID: 1C20ACB9D5C564AE
1 changed files with 4 additions and 4 deletions

View File

@ -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;