From e0c3dc8fc84bf557fad12a1b37c0d6c1a11f7f85 Mon Sep 17 00:00:00 2001 From: Ian Ilyasov Date: Thu, 23 May 2024 11:06:57 +0300 Subject: [PATCH] Fix subscription/029_on_error.pl test when wal_debug=on wal_debug=on results in additional log entries. Previously we would look for the first matching line to get LSN to SKIP up to, but, with wal_debug in mind, we better look for the last matching CONTEXT line after the ERROR line to make sure we won't get an error like ERROR: skip WAL location (LSN x/y) must be greater than origin LSN x/y+delta --- src/test/subscription/t/029_on_error.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/subscription/t/029_on_error.pl b/src/test/subscription/t/029_on_error.pl index 5c29e5cc32..c6dca18030 100644 --- a/src/test/subscription/t/029_on_error.pl +++ b/src/test/subscription/t/029_on_error.pl @@ -29,7 +29,7 @@ sub test_skip_lsn # Get the finish LSN of the error transaction. my $contents = slurp_file($node_subscriber->logfile, $offset); $contents =~ - qr/processing remote data for replication origin \"pg_\d+\" during message type "INSERT" for replication target relation "public.tbl" in transaction \d+, finished at ([[:xdigit:]]+\/[[:xdigit:]]+)/ + qr/ERROR: duplicate key.*\n.*DETAIL:.*\n.*CONTEXT:.* for replication target relation "public.tbl" in transaction \d+, finished at ([[:xdigit:]]+\/[[:xdigit:]]+)/m or die "could not get error-LSN"; my $lsn = $1; -- 2.34.1