diff options
Diffstat (limited to 'src/backend/replication/logical/tablesync.c')
-rw-r--r-- | src/backend/replication/logical/tablesync.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/backend/replication/logical/tablesync.c b/src/backend/replication/logical/tablesync.c index d69fc7086d0..fe45fb88203 100644 --- a/src/backend/replication/logical/tablesync.c +++ b/src/backend/replication/logical/tablesync.c @@ -492,25 +492,15 @@ static List * make_copy_attnamelist(LogicalRepRelMapEntry *rel) { List *attnamelist = NIL; - TupleDesc desc = RelationGetDescr(rel->localrel); int i; - for (i = 0; i < desc->natts; i++) + for (i = 0; i < rel->remoterel.natts; i++) { - int remoteattnum = rel->attrmap[i]; - - /* Skip dropped attributes. */ - if (desc->attrs[i]->attisdropped) - continue; - - /* Skip attributes that are missing on remote side. */ - if (remoteattnum < 0) - continue; - attnamelist = lappend(attnamelist, - makeString(rel->remoterel.attnames[remoteattnum])); + makeString(rel->remoterel.attnames[i])); } + return attnamelist; } |