From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix table syncing with different column order |
Date: | 2017-05-24 23:55:43 |
Message-ID: | E1dDg7z-0001LG-E3@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix table syncing with different column order
Logical replication supports replicating between tables with different
column order. But this failed for the initial table sync because of a
logic error in how the column list for the internal COPY command was
composed. Fix that and also add a test.
Also fix a minor omission in the column name mapping cache. When
creating the mapping list, it would not skip locally dropped columns.
So if a remote column had the same name as a locally dropped
column (...pg.dropped...), then the expected error would not occur.
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/073ce405d68355eed36a11b41e558232ecf18201
Modified Files
--------------
src/backend/replication/logical/relation.c | 9 +++++++--
src/backend/replication/logical/tablesync.c | 16 +++-------------
src/test/subscription/t/001_rep_changes.pl | 15 +++++++++++++--
3 files changed, 23 insertions(+), 17 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2017-05-25 12:51:16 | pgsql: Abort authentication if the client selected an invalid SASL mech |
Previous Message | Peter Eisentraut | 2017-05-24 23:00:32 | pgsql: Improve logical replication worker log messages |