Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aQoEw-0004k0-Ja for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Feb 2016 03:36:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aQoEw-0003qT-6R for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Feb 2016 03:36:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aQoDc-0002MY-Td for pgsql-hackers@postgresql.org; Wed, 03 Feb 2016 03:35:00 +0000 Received: from erelay3.ox.registrar-servers.com ([192.64.117.2]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aQoDY-0001AV-IA for pgsql-hackers@postgresql.org; Wed, 03 Feb 2016 03:34:59 +0000 Received: from localhost (unknown [127.0.0.1]) by erelay1.ox.registrar-servers.com (Postfix) with ESMTP id CD75E220650C; Wed, 3 Feb 2016 03:34:51 +0000 (UTC) Received: from erelay1.ox.registrar-servers.com ([127.0.0.1]) by localhost (erelay.ox.registrar-servers.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Tihukxwt_h59; Tue, 2 Feb 2016 22:34:49 -0500 (EST) Received: from mta2.ox.privateemail.com (mta2.ox.privateemail.com [198.187.29.247]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by erelay1.ox.registrar-servers.com (Postfix) with ESMTPS id 579052206593; Tue, 2 Feb 2016 22:34:49 -0500 (EST) Received: from [192.168.1.13] (OKVLON3010W-LP130-04-1279315450.dsl.bell.ca [76.64.205.250]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mta2.ox.privateemail.com (Postfix) with ESMTPSA id 3D36E60131; Tue, 2 Feb 2016 22:34:46 -0500 (EST) Message-ID: <56B1669A.3040909@ssinger.info> Date: Tue, 02 Feb 2016 21:31:54 -0500 From: Steve Singer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0 MIME-Version: 1.0 To: Craig Ringer CC: PostgreSQL Hackers Subject: Re: pglogical - logical replication contrib module References: <5685BB86.5010901@2ndquadrant.com> <20160123031740.21436.54292.pgcf@coridan.postgresql.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 01/26/2016 10:43 AM, Craig Ringer wrote: > On 23 January 2016 at 11:17, Steve Singer > 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