Skip to content

Commit 9e9abed

Browse files
committed
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
1 parent 3985b60 commit 9e9abed

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/test/recovery/t/019_replslot_limit.pl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@
121121
advance_wal($node_master, 6);
122122

123123
# Slot gets into 'reserved' state
124-
$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'");
125-
is($result, "$start_lsn|reserved|216 bytes", 'check that the slot state changes to "reserved"');
124+
$result = $node_master->safe_psql('postgres', "SELECT wal_status FROM pg_replication_slots WHERE slot_name = 'rep1'");
125+
is($result, "reserved", 'check that the slot state changes to "reserved"');
126126

127127
# do checkpoint so that the next checkpoint runs too early
128128
$node_master->safe_psql('postgres', "CHECKPOINT;");
@@ -131,8 +131,8 @@
131131
advance_wal($node_master, 1);
132132

133133
# Slot gets into 'lost' state
134-
$result = $node_master->safe_psql('postgres', "SELECT restart_lsn, wal_status, min_safe_lsn is NULL FROM pg_replication_slots WHERE slot_name = 'rep1'");
135-
is($result, "$start_lsn|lost|t", 'check that the slot state changes to "lost"');
134+
$result = $node_master->safe_psql('postgres', "SELECT wal_status FROM pg_replication_slots WHERE slot_name = 'rep1'");
135+
is($result, "lost", 'check that the slot state changes to "lost"');
136136

137137
# The standby still can connect to master before a checkpoint
138138
$node_standby->start;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy