Re: pglogical - logical replication contrib module - Mailing list pgsql-hackers

From Andres Freund
Subject Re: pglogical - logical replication contrib module
Date
Msg-id 20160217082749.GI25464@awork2.anarazel.de
Whole thread Raw
In response to Re: pglogical - logical replication contrib module  (Craig Ringer <craig@2ndquadrant.com>)
Responses Re: pglogical - logical replication contrib module
List pgsql-hackers
On 2016-02-17 09:33:56 +0800, Craig Ringer wrote:
> Some DDL operations don't translate well to a series of replicatable
> actions. The case I hit the most is
> 
>    ALTER TABLE mytable ADD COLUMN somecolumn sometype NOT NULL DEFAULT
> some_function();
> 
> This is executed (simplified) by taking an ACCESS EXCLUSIVE lock, changing
> the catalogs but not making the changes visible yet, rewriting the table,
> and committing to make the rewritten table and the catalog changes visible.
> 
> That won't work well with logical replication.

FWIW, I think this is much less a fundamental, and more an
implementation issue. Falling back to just re-replicating the table, and
then optimizing a few common cases (only immutable DEFALUT/USING
involved) should be enough for a while.

Lets get the basics right, before reaching for the moon.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Introduce group locking to prevent parallel processes from deadl
Next
From: Robert Haas
Date:
Subject: Re: PostgreSQL Audit Extension