aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/replication/logical/relation.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/backend/replication/logical/relation.c b/src/backend/replication/logical/relation.c
index 16f4c56bfd7..03ddaaaae9e 100644
--- a/src/backend/replication/logical/relation.c
+++ b/src/backend/replication/logical/relation.c
@@ -259,6 +259,13 @@ logicalrep_rel_open(LogicalRepRelId remoteid, LOCKMODE lockmode)
MemoryContext oldctx;
int i;
+ /* Release the no-longer-useful attrmap, if any. */
+ if (entry->attrmap)
+ {
+ pfree(entry->attrmap);
+ entry->attrmap = NULL;
+ }
+
/* Try to find and lock the relation by name. */
relid = RangeVarGetRelid(makeRangeVar(remoterel->nspname,
remoterel->relname, -1),