projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d98819
)
Fix handling of dropped columns in logical replication
author
Peter Eisentraut
Mon, 7 Aug 2017 14:28:35 +0000
(10:28 -0400)
committer
Peter Eisentraut
Mon, 7 Aug 2017 14:28:35 +0000
(10:28 -0400)
The relation attribute map was not initialized for dropped columns,
leading to errors later on.
Author: Petr Jelinek
Reported-by: Scott Milliken
Bug: #14769
src/backend/replication/logical/relation.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/replication/logical/relation.c
b/src/backend/replication/logical/relation.c
index 77798574562ebc48eb291c8f7a88a478808a2147..a7ea16d714b02ed1f569d8e67ac37436bd193ac3 100644
(file)
--- a/
src/backend/replication/logical/relation.c
+++ b/
src/backend/replication/logical/relation.c
@@
-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));