Re: Schema/table replication

From: Steve Atkins <steve(at)blighty(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Schema/table replication
Date: 2017-09-06 15:53:43
Message-ID: AAA1B907-49ED-496D-9DB4-AC4F750E3C31@blighty.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> On Sep 6, 2017, at 8:48 AM, Marcin Giedz <marcin(dot)giedz(at)arise(dot)pl> wrote:
>
> Does pglogical support views replication as I can't find it in any restrictions ?

There's no need to replicate the contents of a view, as it doesn't contain any data.

pglogical can replicate the initial schema, including any views, but won't replicate DDL changes automatically after that. It does provide a clean way to replicate DDL from the master to slaves with pglogical.replicate_ddl_command().

Cheers,
Steve

> > On Sep 6, 2017, at 6:00 AM, Marcin Giedz <marcin(dot)giedz(at)arise(dot)pl> wrote:
> >
> > Hi, is there any way (3rd party software) to replicate particular schema/table not the whole database with streaming replication built-in mechanism ?
>
> I don't believe so. You can do that with logical replication in v10 - https://www.postgresql.org/docs/10/static/logical-replication.html.
>
> pglogical will give you much the same functionality on current releases. https://www.2ndquadrant.com/en/resources/pglogical/ - installation isn't too painful (though the docs are a little sparse when it comes to which node you should run which command on. Make the postgres.conf changes on master and slave nodes, as slave nodes need replication slots too(?)).
>
> There are a bunch of trigger-based replication frameworks that'll work too, though less efficiently - Slony is widely used, and I used Bucardo successfully for years before moving to pglogical.
>
> Cheers,
> Steve
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Heath 2017-09-06 16:25:48 Hot standby failing with page # of relation # is unintitialized
Previous Message Marcin Giedz 2017-09-06 15:48:17 Re: Schema/table replication