From: Steve Singer <steve@ssinger.info>
To: Craig Ringer <craig@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: pglogical - logical replication contrib module
Date: Tue, 02 Feb 2016 21:31:54 -0500
Message-ID: <56B1669A.3040909@ssinger.info> (raw)
In-Reply-To: <CAMsr+YGTL6Vrrkidn6EKVTVt0Abofn-q+0SDYzk6aHVM5DmPxw@mail.gmail.com>
References: <5685BB86.5010901@2ndquadrant.com>
<CAMsr+YEe3q3DG=oJpeN-v2EbVZKKUqqvdDRh0nJ-_=N9GPAWWw@mail.gmail.com>
<20160123031740.21436.54292.pgcf@coridan.postgresql.org>
<CAMsr+YGTL6Vrrkidn6EKVTVt0Abofn-q+0SDYzk6aHVM5DmPxw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 01/26/2016 10:43 AM, Craig Ringer wrote:
> On 23 January 2016 at 11:17, Steve Singer <steve@ssinger.info
> <mailto:steve@ssinger.info>> wrote:
>
> ** Schema changes involving rewriting big tables
>
> Sometimes you have a DDL change on a large table that will involve
> a table rewrite and the best way of deploying the change is to
> make the DDL change
> on a replicate then once it is finished promote the replica to the
> origin in some controlled fashion. This avoids having to lock the
> table on the origin for hours.
>
> pglogical seems to allow minor schema changes on the replica such
> as changing a type but it doesn't seem to allow a DO INSTEAD
> trigger on the replica. I don't think pglogical currently meets
> this use case particularly well
>
>
> I'm not sure I fully understand that one.
Say you have a table A with column b
and the next version of your application you want to create a second
table B that has column B
create table B (b text);
insert into B select b from a;
alter table a drop column b;
but you want to do this on a replica because it is a very big table and
you want to minimize downtown.
You could have a trigger on the replica that performed updates on B.b
instead of A except triggers don't seem to get run on the replica.
> Craig Ringer http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Training & Services
Steve
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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: steve@ssinger.info, craig@2ndquadrant.com
Subject: Re: pglogical - logical replication contrib module
In-Reply-To: <56B1669A.3040909@ssinger.info>
* 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