Luckily the only consequence of the borked implementation was that
pg_get_replication_identifier_progress() failed with an assertion
failure. There was no problem with replaying those changes because the
other nodes aren't allowed to connect at that point.
static void
bdr_do_not_replicate_assign_hook(bool newvalue, void *extra)
{
+ /* Mark these transactions as not to be replicated to other nodes */
if (newvalue)
- {
- /* Mark these transactions as not to be replicated to other nodes */
- SetupCachedReplicationIdentifier(DoNotReplicateRepNodeId);
- }
+ replication_origin_id = DoNotReplicateRepNodeId;
+ else
+ replication_origin_id = InvalidRepNodeId;
}
XLogRecPtr remote_lsn = InvalidXLogRecPtr,
local_lsn = InvalidXLogRecPtr;
+ Assert(node != DoNotReplicateRepNodeId);
+ Assert(node != InvalidRepNodeId);
+
if (local_replication_state != NULL)
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),