pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Craig Ringer <craig@2ndquadrant.com>
Cc: obartunov@gmail.com, Bruce Momjian <bruce@momjian.us>
Cc: Joshua D. Drake <jd@commandprompt.com>
Cc: Petr Jelinek <petr@2ndquadrant.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: pglogical - logical replication contrib module
Date: Wed, 17 Feb 2016 09:27:50 +0100
Message-ID: <20160217082749.GI25464@awork2.anarazel.de> (raw)
In-Reply-To: <CAMsr+YHMDm0YjjZ63Z65mkHjv9hoRowO2PCozZXKT0cCQtVtZw@mail.gmail.com>
References: <5685BB86.5010901@2ndquadrant.com>
	<56A84422.2030309@commandprompt.com>
	<20160216143820.GC31273@momjian.us>
	<CAF4Au4zmspWiqq=nCFF5Shy-3foaDiwNt+Xk2s7TLa-83D=9Hg@mail.gmail.com>
	<CAMsr+YHMDm0YjjZ63Z65mkHjv9hoRowO2PCozZXKT0cCQtVtZw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (30+ messages)  latest in thread

Message-ID: <20160217082749.GI25464@awork2.anarazel.de>
Permalink:  ../20160217082749.GI25464@awork2.anarazel.de/
Also on:    postgresql.org/message-id/20160217082749.GI25464@awork2.anarazel.de

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: andres@anarazel.de, craig@2ndquadrant.com, bruce@momjian.us, jd@commandprompt.com, petr@2ndquadrant.com
  Subject: Re: pglogical - logical replication contrib module
  In-Reply-To: <20160217082749.GI25464@awork2.anarazel.de>

* 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