Re: pglogical - logical replication contrib module

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: pglogical - logical replication contrib module
Дата
Msg-id CAMsr+YH-=kpPBEHoMsgS2nGtyWpXhSb=kv4dzK5vpUHdL-3Z+A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pglogical - logical replication contrib module  ("Shulgin, Oleksandr" <oleksandr.shulgin@zalando.de>)
Ответы Re: pglogical - logical replication contrib module  (Craig Ringer <craig@2ndquadrant.com>)
Список pgsql-hackers
On 5 January 2016 at 00:46, Shulgin, Oleksandr <oleksandr.shulgin@zalando.de> wrote:
On Fri, Jan 1, 2016 at 12:34 AM, Petr Jelinek <petr@2ndquadrant.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:




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
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dean Rasheed
Дата:
Сообщение: Re: Add numeric_trim(numeric)
Следующее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: pgbench - allow backslash-continuations in custom scripts