From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix table syncing with different column order
Date: Wed, 24 May 2017 23:55:43 +0000
Message-ID: <E1dDg7z-0001LG-E3@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: peter_e@gmx.net
Subject: Re: pgsql: Fix table syncing with different column order
In-Reply-To: <E1dDg7z-0001LG-E3@gemulon.postgresql.org>
References: <E1dDg7z-0001LG-E3@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox