Re: Logical replication existing data copy

From: Craig Ringer <craig(dot)ringer(at)2ndquadrant(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>
Subject: Re: Logical replication existing data copy
Date: 2016-12-20 00:46:24
Message-ID: CAMsr+YEUryigUb4ZaFv-WtKBo1Vhumff3Qm-PBtWz3UY7FHEMw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 20 Dec. 2016 1:27 am, "Peter Eisentraut" <
peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:

On 12/19/16 4:30 AM, Petr Jelinek wrote:
> So existing table data can be copied once subscription is created, but
> also new tables can be added and their data copied. This is where the
> REFRESH PUBLICATION comes into play. Adding table to publication does
> not make it automatically replicated by the subscription as the
> subscription does not have tracking info for that table. So to add new
> table user must call ALTER SUBSCRIPTION ... REFRESH PUBLICATION on
> subscriber otherwise the data won't be replicated.

Couldn't the subscriber automatically add tracking info when apply
stream data arrives for a relation it has not seen before?

If no table has been created by the user and we start trying to apply a
data stream apply will break.

Since manual action is needed to create the destination I don't see a
problem with requiring manual enabling too, personally.

Let the fully transparent way wait until we can do DDL replication in v11+

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2016-12-20 00:47:21 Re: Minor correction in alter_table.sgml
Previous Message Thomas Munro 2016-12-19 23:35:08 Re: Creating a DSA area to provide work space for parallel execution