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

Commit9fd8b33

Browse files
author
Amit Kapila
committed
Fix unstable test in 040_pg_createsubscriber.
The slot synchronization failed because the local slot's (created duringslot synchronization) catalog_xmin on standby is ahead of remote slot.This happens because the INSERT before slot synchronization results in thegeneration of a new xid that could be replicated to the standby. Nowbefore the xmin of the physical slot on the primary catches up viahot_standby_feedback, the test has created a logical slot that got someprior value of catalog_xmin.To fix this we could try to ensure that the physical slot's catalog_xminis caught up to latest value before creating a logical slot but we took asimpler path to move the INSERT after synchronizing the logical slot.Reported-by: Alexander Lakhin as per buildfarmDiagnosed-by: Amit Kapila, Hou Zhijie, Alexander LakhinAuthor: Hou ZhijieBackpatch-through: 17Discussion:https://postgr.es/m/bde6ac67-69cc-c104-5ab6-dd4f5deadf24@gmail.com
1 parent22d946b commit9fd8b33

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

‎src/bin/pg_basebackup/t/040_pg_createsubscriber.pl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,6 @@ sub generate_db
227227
],
228228
'primary server is in recovery');
229229

230-
# Insert another row on node P and wait node S to catch up
231-
$node_p->safe_psql($db1,"INSERT INTO tbl1 VALUES('second row')");
232-
$node_p->wait_for_replay_catchup($node_s);
233-
234230
# Check some unmet conditions on node P
235231
$node_p->append_conf(
236232
'postgresql.conf',q{
@@ -306,6 +302,14 @@ sub generate_db
306302
);
307303
is($result,'failover_slot','failover slot is synced');
308304

305+
# Insert another row on node P and wait node S to catch up. We
306+
# intentionally performed this insert after syncing logical slot
307+
# as otherwise the local slot's (created during synchronization of
308+
# slot) xmin on standby could be ahead of the remote slot leading
309+
# to failure in synchronization.
310+
$node_p->safe_psql($db1,"INSERT INTO tbl1 VALUES('second row')");
311+
$node_p->wait_for_replay_catchup($node_s);
312+
309313
# Create subscription to test its removal
310314
my$dummy_sub ='regress_sub_dummy';
311315
$node_p->safe_psql($db1,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp