Re: Identity/Serial Column In Subscriber's Tables

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Avi Weinberg <AviW(at)gilat(dot)com>, "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 11:51:02
Message-ID: cc713b430c157f49869f0d94b57126479bdf63ca.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Willy Skjæveland 2021-12-09 12:06:56 help
Previous Message Marc Millas 2021-12-09 11:38:18 Re: performance expectations for table(s) with 2B recs