Re: Detecting renamed columns via pgouput in logical replication ? - Mailing list pgsql-general

From Andreas Andreakis
Subject Re: Detecting renamed columns via pgouput in logical replication ?
Date
Msg-id CAFtXTgtkLNgMZB5F-bRfG6C2hLwCTpssQRH+09N8UMpk0eyEcw@mail.gmail.com
Whole thread Raw
In response to Re: Detecting renamed columns via pgouput in logical replication ?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Detecting renamed columns via pgouput in logical replication ?
Re: Detecting renamed columns via pgouput in logical replication ?
List pgsql-general
Thx for replying David.

According to https://www.postgresql.org/docs/10/protocol-logicalrep-message-formats.html it looks like certain schema information is embedded via pgoutput such as column names and types. However, if a new column name appears and a previous not, then it is currently not possible to differentiate if a column was renamed VS if a new column was added and an old dropped.

There are additional schema changes that are currently not covered, such as changes in default values. 

Are there plans to add comprehensive schema change detection abilities via logical replication ? either by embedding more information into pgoutput or perhaps by embedding the schema DDLs ?  

cheers





On Sun, Apr 26, 2020 at 11:07 PM David G. Johnston <david.g.johnston@gmail.com> wrote:
On Thursday, April 16, 2020, Andreas Andreakis <andreas.andreakis@gmail.com> wrote:

Does this allow to detect column renames ?

The database schema and DDL commands are not replicated“


David J.

pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: Detecting renamed columns via pgouput in logical replication ?
Next
From: "David G. Johnston"
Date:
Subject: Re: Detecting renamed columns via pgouput in logical replication ?