Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d5dd44b

Browse files
committed
Allow multiple backends to setup same replication session.
1 parent f3e0e58 commit d5dd44b

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

src/backend/replication/logical/origin.c

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,13 +1070,20 @@ replorigin_session_setup(RepOriginId node)
10701070
if (curstate->roident != node)
10711071
continue;
10721072

1073-
else if (curstate->acquired_by != 0)
1074-
{
1075-
ereport(ERROR,
1076-
(errcode(ERRCODE_OBJECT_IN_USE),
1077-
errmsg("replication identifier %d is already active for PID %d",
1078-
curstate->roident, curstate->acquired_by)));
1079-
}
1073+
/*
1074+
* MTM-CRUTCH.
1075+
*
1076+
* Allow multiple backends to setup same replication session.
1077+
*
1078+
* else if (curstate->acquired_by != 0)
1079+
* {
1080+
* ereport(ERROR,
1081+
* (errcode(ERRCODE_OBJECT_IN_USE),
1082+
* errmsg("replication identifier %d is already active for PID %d",
1083+
* curstate->roident, curstate->acquired_by)));
1084+
* }
1085+
*
1086+
*/
10801087

10811088
/* ok, found slot */
10821089
session_replication_state = curstate;

0 commit comments

Comments
 (0)