pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Dan shmidt <dshmidt@hotmail.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Logical Replication of Multiple Schema Versions
Date: Wed, 11 Dec 2019 17:13:51 +0100
Message-ID: <c131c6f5-35db-cbde-f35b-3532a7181fe5@2ndquadrant.com> (raw)
In-Reply-To: <MN2PR02MB644760B495509681468FEDE1A45B0@MN2PR02MB6447.namprd02.prod.outlook.com>
References: <MN2PR02MB644760B495509681468FEDE1A45B0@MN2PR02MB6447.namprd02.prod.outlook.com>

On 2019-12-10 08:55, Dan shmidt wrote:
> What is the correct way to perform such an operation?
> Is there a way to keep constraint #1 or the only option is to not allow 
> "breaking" schema changes between versions.

It all depends on the specific schema changes you want to make.  You can 
add columns on the subscriber and remove columns on the publisher 
without breaking things (unless there are not-null constraints). 
Renaming columns will break replication until you rename them 
everywhere.  Column type changes will usually just work as long as the 
data fits into both the old and the new type.

You really need to carefully plan and test each class of scenarios 
separately.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (3+ messages)  latest in thread

Message-ID: <c131c6f5-35db-cbde-f35b-3532a7181fe5@2ndquadrant.com>
Permalink:  ../c131c6f5-35db-cbde-f35b-3532a7181fe5@2ndquadrant.com/
Also on:    postgresql.org/message-id/c131c6f5-35db-cbde-f35b-3532a7181fe5@2ndquadrant.com

 · 

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: peter.eisentraut@2ndquadrant.com, dshmidt@hotmail.com
  Subject: Re: Logical Replication of Multiple Schema Versions
  In-Reply-To: <c131c6f5-35db-cbde-f35b-3532a7181fe5@2ndquadrant.com>
  References: <MN2PR02MB644760B495509681468FEDE1A45B0@MN2PR02MB6447.namprd02.prod.outlook.com> <c131c6f5-35db-cbde-f35b-3532a7181fe5@2ndquadrant.com>

* 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