Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitac8c85d

Browse files
committed
Improve stability of subscription/029_on_error.pl
This test was failing when using wal_debug=on and -DWAL_DEBUG because ofadditional log entries that made the test grab an LSN not mapping withthe error expected in the test.Previously the test would look for the first matching line to get theLSN to skip up to. This is improved by having the test scan the logswith a regexp that checks for the expected ERROR string, ensuring thatthe wanted LSN comes from the correct context.Backpatch down to 15 where this test has been introduced.Author: Ian IlyasovDiscussion:https://postgr.es/m/GV1P251MB100415F17E6B2FDD7188777ECDE32@GV1P251MB1004.EURP251.PROD.OUTLOOK.COMBackpatch-through: 15
1 parent0162a9b commitac8c85d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/test/subscription/t/029_on_error.pl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ sub test_skip_lsn
2626
"SELECT subenabled = FALSE FROM pg_subscription WHERE subname = 'sub'"
2727
);
2828

29-
# Get the finish LSN of the error transaction.
29+
# Get the finish LSN of the error transaction, mapping the expected
30+
# ERROR with its CONTEXT when retrieving this information.
3031
my$contents = slurp_file($node_subscriber->logfile,$offset);
3132
$contents =~
32-
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:]]+)/
33+
qr/duplicate key value violates unique constraint "tbl_pkey".*\n.*DETAIL:.*\n.*CONTEXT:.*for replication target relation "public.tbl" in transaction\d+, finished at ([[:xdigit:]]+\/[[:xdigit:]]+)/m
3334
ordie"could not get error-LSN";
3435
my$lsn =$1;
3536

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp