Fix compiler warning
authorPeter Eisentraut <peter@eisentraut.org>
Tue, 24 Mar 2020 15:01:06 +0000 (16:01 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Tue, 24 Mar 2020 15:02:01 +0000 (16:02 +0100)
A variable was unused in non-assert builds.  Simplify the code to
avoid the issue.

Reported-by: Erik Rijkers <er@xs4all.nl>
src/backend/replication/logical/worker.c

index e5f0aaa8f72594d3d05c1b5a00a8963fbb97727c..fa3811783f6e9ecd7719a8de8c3813b3bb243315 100644 (file)
@@ -788,7 +788,6 @@ apply_handle_update_internal(ResultRelInfo *relinfo,
                             LogicalRepRelMapEntry *relmapentry)
 {
    Relation    localrel = relinfo->ri_RelationDesc;
-   LogicalRepRelation *remoterel = &relmapentry->remoterel;
    Oid         idxoid;
    EPQState    epqstate;
    TupleTableSlot *localslot;
@@ -806,7 +805,7 @@ apply_handle_update_internal(ResultRelInfo *relinfo,
     */
    idxoid = GetRelationIdentityOrPK(localrel);
    Assert(OidIsValid(idxoid) ||
-          (remoterel->replident == REPLICA_IDENTITY_FULL));
+          (relmapentry->remoterel.replident == REPLICA_IDENTITY_FULL));
 
    if (OidIsValid(idxoid))
        found = RelationFindReplTupleByIndex(localrel, idxoid,