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
This commit is contained in:
Peter Eisentraut 2017-08-07 10:28:35 -04:00
parent 8d9881911f
commit 0e58455dd4

View file

@ -280,7 +280,10 @@ logicalrep_rel_open(LogicalRepRelId remoteid, LOCKMODE lockmode)
int attnum;
if (desc->attrs[i]->attisdropped)
{
entry->attrmap[i] = -1;
continue;
}
attnum = logicalrep_rel_att_by_name(remoterel,
NameStr(desc->attrs[i]->attname));