[GENERAL] Logical replication - behavior of REFRESH PUBLICATION's copy_data option - Mailing list pgsql-general

From Adam LaMore
Subject [GENERAL] Logical replication - behavior of REFRESH PUBLICATION's copy_data option
Date
Msg-id CA+B+wX=U5kZukTdFBdOAyAEXj1q1xA_fdAZNW7AgBJKVfbwiTw@mail.gmail.com
Whole thread Raw
List 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

pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: [GENERAL] How to find out extension directory
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] How to find out extension directory