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

Commitbbf83b2

Browse files
committed
Fix handling of mtm_restart_pos parameter
1 parentfc058eb commitbbf83b2

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

‎contrib/mmts/Cluster.pm‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ sub configure
108108
multimaster.max_nodes = 3
109109
multimaster.ignore_tables_without_pk = true
110110
multimaster.twopc_min_timeout = 2000
111+
log_line_prefix = '%t: '
111112
));
112113

113114
$node->append_conf("pg_hba.conf",qq(

‎contrib/mmts/multimaster.c‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2680,6 +2680,13 @@ void MtmReceiverStarted(int nodeId)
26802680
MtmUnlock();
26812681
}
26822682

2683+
voidMtmReleaseRecoverySlot(intnodeId)
2684+
{
2685+
if (Mtm->recoverySlot==nodeId) {
2686+
Mtm->recoverySlot=0;
2687+
}
2688+
}
2689+
26832690
/*
26842691
* Determine when and how we should open replication slot.
26852692
* Druing recovery we need to open only one replication slot from which node should receive all transactions.
@@ -2811,7 +2818,6 @@ MtmReplicationStartupHook(struct PGLogicalStartupHookArgs* args)
28112818
}else {
28122819
elog(ERROR,"Replication mode is not specified");
28132820
}
2814-
break;
28152821
}elseif (strcmp("mtm_restart_pos",elem->defname)==0) {
28162822
if (elem->arg!=NULL&&strVal(elem->arg)!=NULL) {
28172823
recoveryStartPos=intVal(elem->arg);

‎contrib/mmts/multimaster.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ extern bool MtmWatchdog(timestamp_t now);
348348
externvoidMtmCheckHeartbeat(void);
349349
externvoidMtmResetTransaction(void);
350350
externvoidMtmUpdateLockGraph(intnodeId,voidconst*messageBody,intmessageSize);
351+
externvoidMtmReleaseRecoverySlot(intnodeId);
351352
externPGconn*PQconnectdb_safe(constchar*conninfo);
352353

353354

‎contrib/mmts/pglogical_receiver.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,7 @@ pglogical_receiver_main(Datum main_arg)
649649

650650
OnError:
651651
PQfinish(conn);
652+
MtmReleaseRecoverySlot(nodeId);
652653
MtmSleep(RECEIVER_SUSPEND_TIMEOUT);
653654
}
654655
ByteBufferFree(&buf);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp