Re: Schema/table replication

From: Nico Williams <nico(at)cryptonector(dot)com>
To: Steve Atkins <steve(at)blighty(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Schema/table replication
Date: 2017-09-06 16:54:34
Message-ID: 20170906165432.GA3831@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Sep 06, 2017 at 08:22:14AM -0700, Steve Atkins wrote:
> > 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.

Well, session_replication_role exists so that you can implement your own
logical replication, and with that you can have full control over what
to replicate and what not replicate. There is no builtin functionality
that does this. Third-party software? Try this search and similar in
other engines:

https://github.com/search?utf8=%E2%9C%93&q=session_replication_role+extension%3Asql&type=Code&ref=advsearch&l=&l=

> 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.

Yeah.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dipesh Dangol 2017-09-06 18:55:58 logical replication API to read WAL file through replication slot
Previous Message Robert Inder 2017-09-06 16:43:28 Confused about max_standby_streaming_delay