Logical replication - behavior of REFRESH PUBLICATION's copy_data option

From: Adam LaMore <alamore(at)agilissystems(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Logical replication - behavior of REFRESH PUBLICATION's copy_data option
Date: 2017-10-20 20:58:49
Message-ID: CA+B+wX=U5kZukTdFBdOAyAEXj1q1xA_fdAZNW7AgBJKVfbwiTw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

I'm exploring the new PG10 logical replication feature and trying to
understand how ALTER SUBSCRIPTION ... REFRESH PUBLICATION works.

My planned publication will have over 100 tables, some of which are quite
large. If I add a table to the publication, I understand that I have to use
the above command on the subscriber to refresh its subscription. The
default value of the copy_data option is true, but I'm unclear if that will
(A) re-copy all of the data for all of the tables in the publication; (B)
copy the data for only the newly added table; or (C) some other behavior.
So does anyone know which one it is?

If (A) is true, then I assume I can avoid that by setting copy_data =
false. If I do that, how do I copy only the data for the newly added table
from the publisher to the subscriber? Perhaps an out-of-band dump and
restore of just that table? And should that be before or after the call to
"REFRESH PUBLICATION?

Thanks in advance,
Adam

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2017-10-20 21:10:41 Re: How to find out extension directory
Previous Message David G. Johnston 2017-10-20 20:57:34 Re: How to find out extension directory