pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: greigwise <greigwise@comcast.net>
To: pgsql-general@postgresql.org
Subject: Re: pglogical in postgres 9.6
Date: Mon, 12 Feb 2018 15:19:17 -0800
Message-ID: <8be94335-ed26-d1ad-d480-11e4656cd466@aklaver.com> (raw)
In-Reply-To: <1518473478381-0.post@n3.nabble.com>
References: <1518473478381-0.post@n3.nabble.com>

On 02/12/2018 02:11 PM, greigwise wrote:
> Hello.  I'm trying to get pglogical setup between 2 postgres 9.6 instances.
> I can get everything replicating over fine, my problem is that I can't seem
> to get it to work in the mode where it does not try to copy all the data
> over initially.  On the source side, I'm doing this:
> 
>    psql -U hireology -d $SRCDB -c "SELECT pglogical.create_node( node_name :=
> '${SRCNODE}', dsn := 'host=localhost port=${SRCPORT} dbname=${SRCDB}
> user=logical_replication')"
>    
>    psql -U hireology -d $SRCDB -c "select
> pglogical.create_replication_set('dw_repl', true, true, true, true)"
>    
>    psql -U hireology -d $SRCDB -c "select pglogical.replication_set_add_table
> ('dw_repl', 'accounts', false)"
>    psql -U hireology -d $SRCDB -c "select pglogical.replication_set_add_table
> ('dw_repl', 'organizations', false)"
>    psql -U hireology -d $SRCDB -c "select
> pglogical.replication_set_add_sequence ('dw_repl', 'accounts_id_seq',
> false)"
>    psql -U hireology -d $SRCDB -c "select
> pglogical.replication_set_add_sequence ('dw_repl', 'organizations_id_seq',
> false)"
> 
> Note on the replication_set_add_table command, I'm sending false as the
> third parameter which should tell it to not copy over the initial data.  But
> when I create the subscription on the target side, I can see in the logs
> where it is issuing the copy command.  And since I have the data already
> there, I get duplicate key errors and it bombs out.  Any suggestions?

I don't know what is going on, but for those that might the pglogical 
version you are using might be helpful.

> 
> Thanks,
> Greig Wise
> 
> 
> 
> 
> --
> Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com




view thread (10+ messages)  latest in thread

Message-ID: <8be94335-ed26-d1ad-d480-11e4656cd466@aklaver.com>
Permalink:  ../8be94335-ed26-d1ad-d480-11e4656cd466@aklaver.com/
Also on:    postgresql.org/message-id/8be94335-ed26-d1ad-d480-11e4656cd466@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, greigwise@comcast.net
  Subject: Re: pglogical in postgres 9.6
  In-Reply-To: <8be94335-ed26-d1ad-d480-11e4656cd466@aklaver.com>
  References: <1518473478381-0.post@n3.nabble.com> <8be94335-ed26-d1ad-d480-11e4656cd466@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox