Re: Logical replication to partitioned subscriber

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Jeremy Finzel <finzelj(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Logical replication to partitioned subscriber
Date: 2018-09-14 21:30:48
Message-ID: 20180914213047.2jmvolxmeunnubin@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2018-Sep-14, Jeremy Finzel wrote:

> Are there any plans to support logical replication to a table which is only
> partitioned on the subscriber? We are very interested in such a feature
> for a couple use cases. We are using logical replication for archiving
> data and we only want it partitioned on the archive server, and we want it
> to just work transparently with logical replication.
>
> Another use case is to convert a huge OLTP database table to be
> partitioned, and as opposed to writing a script, use logical replication to
> replicate to a destination replica which has the partitioning work done
> online, then swap nodes.
>
> We are using pglogical, but I see from the docs that the same limitations
> apply even in pg11's built-in logical replication.

As I understand, in pglogical you can set pglogical.use_spi and it
Should Work(tm).

As for built-in replication, I'm afraid there's a small patch required
to make it work, and nobody wrote it for pg11.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2018-09-14 21:31:16 Re: [HACKERS] proposal: schema variables
Previous Message Isaac Morland 2018-09-14 21:12:57 Re: Delta Materialized View Refreshes?