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

Commitc17006f

Browse files
knizhnikkelvich
authored andcommitted
Fix handling of mtm_restart_pos parameter
1 parentdd1634f commitc17006f

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

‎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(

‎multimaster.c

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

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

‎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

‎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