From: | Avi Weinberg <AviW(at)gilat(dot)com> |
---|---|
To: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | RE: Identity/Serial Column In Subscriber's Tables |
Date: | 2021-12-09 14:19:35 |
Message-ID: | DB9PR07MB7180DD193B71582F9EC1755DCB709@DB9PR07MB7180.eurprd07.prod.outlook.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi Laurenz
Thanks for your answer.
If I do not modify data on the subscriber side, the best practice will be to not to define the column as identity or it is better to have subscriber's table definition as close as possible to the publisher and leave it as identity?
Thanks
-----Original Message-----
From: Laurenz Albe [mailto:laurenz(dot)albe(at)cybertec(dot)at]
Sent: Thursday, December 9, 2021 1:51 PM
To: Avi Weinberg <AviW(at)gilat(dot)com>; pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Identity/Serial Column In Subscriber's Tables
On Thu, 2021-12-09 at 09:13 +0000, Avi Weinberg wrote:
> What is the best practice when dealing with Identity/Serial column in logical replication.
> Should the subscriber table have this column also defined as Identity/Serial or have it defined as regular integer?
> Is leaving it as Identity/Serial also on subscriber tables, can potentially cause a problem?
It does not really matter if you use "serial" or an identity column on the logical standby or not. The sequence on the standby won't be advanced.
The best way to prevent conflicts from happening is *not* to modify the data on the standby.
IMPORTANT - This email and any attachments is intended for the above named addressee(s), and may contain information which is confidential or privileged. If you are not the intended recipient, please inform the sender immediately and delete this email: you should not copy or use this e-mail for any purpose nor disclose its contents to any person.
From | Date | Subject | |
---|---|---|---|
Next Message | Shaozhong SHI | 2021-12-09 14:46:05 | Re: Detecting repeated phrase in a string |
Previous Message | Peter J. Holzer | 2021-12-09 13:35:10 | Re: Detecting repeated phrase in a string |