Re: pglogical - logical replication contrib module

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: "Shulgin, Oleksandr" <oleksandr(dot)shulgin(at)zalando(dot)de>
Cc: Petr Jelinek <petr(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pglogical - logical replication contrib module
Date: 2016-01-07 08:28:17
Message-ID: CAMsr+YH-=kpPBEHoMsgS2nGtyWpXhSb=kv4dzK5vpUHdL-3Z+A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 5 January 2016 at 00:46, Shulgin, Oleksandr <oleksandr(dot)shulgin(at)zalando(dot)de
> wrote:

> On Fri, Jan 1, 2016 at 12:34 AM, Petr Jelinek <petr(at)2ndquadrant(dot)com>
> wrote:
>
>> Hi,
>>
>> I'd like to submit the replication solution which is based on the
>> pglogical_output [1] module (which is obviously needed for this to compile).
>>
>
> Hi,
>
> Impressive stuff!
>
> Apparently this depends on a newer, yet-to-be-published version of the
> pglogical_output patch:
>
> .../contrib/pglogical/pglogical_hooks.c: In function
> ‘pglogical_row_filter_hook’:
> .../contrib/pglogical/pglogical_hooks.c:173:35: error: ‘struct
> PGLogicalRowFilterArgs’ has no member named ‘change’
> HeapTuple tup = &rowfilter_args->change->data.tp.newtuple->tuple;
>

Good point. Looks like I forgot to push. Done now:

https://github.com/2ndquadrant/postgres/tree/dev/pglogical-output

https://github.com/2ndQuadrant/postgres/tree/pglogical-output-v5

I hadn't posted the rev to -hackers yet because I still have to finish
SGMLifying the docs before it can be a real candidate for inclusion. The
current docs have drifted a little as a result of that WIP. I'm not really
working for another week and a half though, so I might as well post the
current status as-is.

Still have to finish the docs conversion but that's the only remaining open
item.

Note that this patch has 9.4 support. I'd be pretty happy to be able to
retain that, mostly to avoid the need to carry a backported version as a
separately packaged extension, but I'm not sure what the general opinion
will be on that.

> +PGconn *
> +pglogical_connect(const char *connstring, const char *connname)
> +{
> + PGconn *conn;
> + StringInfoData dsn;
> +
> + initStringInfo(&dsn);
> + appendStringInfo(&dsn,
> + "%s fallback_application_name='%s'",
> + connstring, connname);
> +
> + conn = PQconnectdb(dsn.data);
>
> This is prone to errors when connstring is specified in URI format. A
> workaround is provided in this commit for
> walreceiver: b3fc6727ce54a16ae9227bcccfebfa028ac5b16f
>
>
Thanks for the heads-up there.

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
pglogical-v5.patch text/x-patch 251.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2016-01-07 08:36:03 Re: pgbench - allow backslash-continuations in custom scripts
Previous Message Dean Rasheed 2016-01-07 08:10:06 Re: Add numeric_trim(numeric)