pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Avi Weinberg <AviW@gilat.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Identity/Serial Column In Subscriber's Tables
Date: Thu, 09 Dec 2021 12:51:02 +0100
Message-ID: <cc713b430c157f49869f0d94b57126479bdf63ca.camel@cybertec.at> (raw)
In-Reply-To: <DB9PR07MB7180BB8F0CFD28857B89B250CB709@DB9PR07MB7180.eurprd07.prod.outlook.com>
References: <DB9PR07MB7180BB8F0CFD28857B89B250CB709@DB9PR07MB7180.eurprd07.prod.outlook.com>

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






view thread (3+ messages)  latest in thread

Message-ID: <cc713b430c157f49869f0d94b57126479bdf63ca.camel@cybertec.at>
Permalink:  ../cc713b430c157f49869f0d94b57126479bdf63ca.camel@cybertec.at/
Also on:    postgresql.org/message-id/cc713b430c157f49869f0d94b57126479bdf63ca.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: laurenz.albe@cybertec.at, AviW@gilat.com
  Subject: Re: Identity/Serial Column In Subscriber's Tables
  In-Reply-To: <cc713b430c157f49869f0d94b57126479bdf63ca.camel@cybertec.at>
  References: <DB9PR07MB7180BB8F0CFD28857B89B250CB709@DB9PR07MB7180.eurprd07.prod.outlook.com> <cc713b430c157f49869f0d94b57126479bdf63ca.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox