Re: Logical Replication WIP

From: Petr Jelinek <petr(at)2ndquadrant(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Craig Ringer <craig(at)2ndquadrant(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Erik Rijkers <er(at)xs4all(dot)nl>, Steve Singer <steve(at)ssinger(dot)info>
Subject: Re: Logical Replication WIP
Date: 2016-09-08 22:59:26
Message-ID: c3335aef-04af-1f8e-aaf3-d343d0a9d74d@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Updated version, this should address most of the things in Peter's
reviews so far, not all though as some of it needs more discussion.

Changes:
- I moved the publication.c to pg_publication.c, subscription.c to
pg_subscription.c.
- changed \drp and \drs to \dRp and \dRs
- fixed definitions of the catalogs (BKI_ROWTYPE_OID)
- changed some GetPublication calls to get_publication_name
- fixed getObjectIdentityParts for OCLASS_PUBLICATION_REL
- fixed get_object_address_publication_rel
- fixed the dependencies between pkeys and publications, for this I
actually had to add new interface to depenency.c that allows dropping
single dependency
- fixed the 'for all tables' and 'for tables all in schema' publications
- changed the alter publication from FOR to SET
- added more test cases for the publication DDL
- fixed compilation of subscription patch alone and docs
- changed subpublications to name[]
- added check for publication list duplicates
- made the subscriptions behave more like they are inside the database
instead of shared catalog (even though the catalog is still shared)
- added options for for CREATE SUBSCRIPTION to optionally not create
slot and not do the initial data sync - that should solve the complaint
about CREATE SUBSCRIPTION always connecting
- the CREATE SUBSCRIPTION also tries to check if the specified
connection connects back to same db (although that check is somewhat
imperfect) and if it gets stuck on create slot it should be normally
cancelable (that should solve the issue Steve Singer had)
- fixed the tests to work in any timezone
- added DDL regress tests for subscription
- added proper detection of missing schemas and tables on subscriber
- rebased on top of 19acee8 as the DefElem changes broke the patch

The table sync is still far from ready.

--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
0001-Add-PUBLICATION-catalogs-and-DDL.patch.gz application/gzip 27.1 KB
0002-Add-SUBSCRIPTION-catalog-and-DDL.patch.gz application/gzip 20.4 KB
0003-Define-logical-replication-protocol-and-output-plugi.patch.gz application/gzip 12.9 KB
0004-Make-libpqwalreceiver-reentrant.patch.gz application/gzip 7.4 KB
0005-Add-logical-replication-workers.patch.gz application/gzip 37.5 KB
0006-Logical-replication-support-for-initial-data-copy.patch.gz application/gzip 27.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2016-09-08 22:59:32 Re: Let file_fdw access COPY FROM PROGRAM
Previous Message Andres Freund 2016-09-08 22:50:42 Re: mdtruncate leaking fd.c handles?