aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/replication/logical/worker.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c
index 0fb577d3281..925dff9cc44 100644
--- a/src/backend/replication/logical/worker.c
+++ b/src/backend/replication/logical/worker.c
@@ -2929,9 +2929,10 @@ FindReplTupleInLocalRel(ApplyExecutionData *edata, Relation localrel,
Relation idxrel = index_open(localidxoid, AccessShareLock);
/* Index must be PK, RI, or usable for REPLICA IDENTITY FULL tables */
- Assert(GetRelationIdentityOrPK(idxrel) == localidxoid ||
- IsIndexUsableForReplicaIdentityFull(BuildIndexInfo(idxrel),
- edata->targetRel->attrmap));
+ Assert(GetRelationIdentityOrPK(localrel) == localidxoid ||
+ (remoterel->replident == REPLICA_IDENTITY_FULL &&
+ IsIndexUsableForReplicaIdentityFull(BuildIndexInfo(idxrel),
+ edata->targetRel->attrmap)));
index_close(idxrel, AccessShareLock);
#endif