On Tue, Nov 9, 2021 at 7:50 AM Avi Weinberg <AviW@xxxxxxxxx> wrote:
Was this done on purpose, that default value for new column is not copied for existing data? Does this mean that on destination side we must also define the table with default value?
Logical replication has two modes, initial synchronization and ongoing change push. The ongoing change push sends entire rows, when they change, from the publisher to subscriber.
The initial sync happens once, when the subscriber initially subscribes to the publication.
As entire rows are getting sent, defaults on the subscriber are immaterial so far as the published rows are concerned.
If you run a command on the publisher that causes every row to change then of course every row will be published with those new values to the subscriber.
David J.