From: | Petr Jelinek <petr(at)2ndquadrant(dot)com> |
---|---|
To: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Logical Replication WIP |
Date: | 2016-08-09 09:14:40 |
Message-ID: | 65193a50-6d4b-b5db-8326-daa1f4cfd108@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 09/08/16 09:59, Masahiko Sawada wrote:
>>> On 2016-08-05 17:00:13 +0200, Petr Jelinek wrote:
>>>> as promised here is WIP version of logical replication patch.
>>>
>
> Thank you for working on this!
Thanks for looking!
>
> I've applied these patches to current HEAD, but got the following error.
>
> libpqwalreceiver.c:48: error: redefinition of typedef ‘WalReceiverConnHandle’
> ../../../../src/include/replication/walreceiver.h:137: note: previous
> declaration of ‘WalReceiverConnHandle’ was here
> make[2]: *** [libpqwalreceiver.o] Error 1
> make[1]: *** [install-backend/replication/libpqwalreceiver-recurse] Error 2
> make: *** [install-src-recurse] Error 2
>
> After fixed this issue with attached patch, I used logical replication a little.
> Some random comments and questions.
>
Interesting, my compiler does have problem. Will investigate.
> The logical replication launcher process and the apply process are
> implemented as a bgworker. Isn't better to have them as an auxiliary
> process like checkpointer, wal writer?
> IMO the number of logical replication connections should not be
> limited by max_worker_processes.
>
What Craig said reflects my rationale for doing this pretty well.
> We need to set the publication up by at least CREATE PUBLICATION and
> ALTER PUBLICATION command.
> Can we make CREATE PUBLICATION possible to define tables as well?
> For example,
> CREATE PUBLICATION mypub [ TABLE table_name, ...] [WITH options]
Agreed, that just didn't make it to the first cut to -hackers. We've
been also thinking of having special ALL TABLES parameter there that
would encompass whole db.
> --
> This patch can not drop the subscription.
>
> =# drop subscription sub;
> ERROR: unrecognized object class: 6102
>
Yeah that's because of the patch 0006, I didn't finish all the
dependency tracking for the pg_subscription_rel catalog that it adds
(which is why I called it PoC). I expect to have this working in next
version (there is still quite a bit of polish work needed in general).
--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Petr Jelinek | 2016-08-09 09:23:28 | Re: Logical Replication WIP |
Previous Message | Vladimir Sitnikov | 2016-08-09 08:50:03 | Re: Slowness of extended protocol |