Search Postgresql Archives

Re: Logical Replication - Should Destination Table Columns Be Defined With Default Value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux