Skip to content

Commit 0e58455

Browse files
committed
Fix handling of dropped columns in logical replication
The relation attribute map was not initialized for dropped columns, leading to errors later on. Author: Petr Jelinek <petr.jelinek@2ndquadrant.com> Reported-by: Scott Milliken <scott@deltaex.com> Bug: #14769
1 parent 8d98819 commit 0e58455

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/backend/replication/logical/relation.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,10 @@ logicalrep_rel_open(LogicalRepRelId remoteid, LOCKMODE lockmode)
280280
int attnum;
281281

282282
if (desc->attrs[i]->attisdropped)
283+
{
284+
entry->attrmap[i] = -1;
283285
continue;
286+
}
284287

285288
attnum = logicalrep_rel_att_by_name(remoterel,
286289
NameStr(desc->attrs[i]->attname));

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy