Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1elNNf-0001xj-IK for pgsql-general@arkaria.postgresql.org; Mon, 12 Feb 2018 23:19:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1elNNd-0008Ld-Ry for pgsql-general@arkaria.postgresql.org; Mon, 12 Feb 2018 23:19:25 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1elNNd-0008LT-4o for pgsql-general@lists.postgresql.org; Mon, 12 Feb 2018 23:19:25 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1elNNY-00023t-Mo for pgsql-general@postgresql.org; Mon, 12 Feb 2018 23:19:23 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 6934220D4F; Mon, 12 Feb 2018 18:19:18 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute6.internal (MEProxy); Mon, 12 Feb 2018 18:19:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=aHLJBKBTcarJJYgx5J7L9cGIbvgMN VDOrJ9mEwYpwFE=; b=g8IhkZP6T/LMb9Vu+pirMTPaMk78jnX2UJFm2yQFOZ82L AEg5M8KtiC+eqnzGgwLs8uBs5exBgqOcaXHHTLNlmBmcVU1CoG9M1aMBBxSXPSt+ 8VS+RaCbK/4m53bPIHhBJcUAozEJUDpYpB38JVmH8Vf55xv2tTg/+ueAXy4+iOOh CxhkuqY4J9eRrniA3/rMBVDZrjwOBZCXZ+wCmjj9dEpj+Zf7GU7p/sVXnbRTG04F HUzSwqsvbanTdMiNpYRtCgeks25MGWXDPr8lv3n7EefJxSOb4VZIyN/p5otdH509 4joFLPoERTGIaVP0SF6CROriRULjgkgeAuOyzubbQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=aHLJBK BTcarJJYgx5J7L9cGIbvgMNVDOrJ9mEwYpwFE=; b=avAYh1dFUuiciE1whp4qkj PWfukG5hbpXuGWx2sQOJJoq0wjYg4dQ9S5Sk/MBBlVqFwrJomYFMP1j7GsqatY6T qsKDrFCiLibkD6tAynWng+hXFdg0AnBHOoQCWX81DLHnG1AOZ2XSe0E6lFB8Pg6N /guXdLV/FoiR4thcJKQglDovbh0+eodUjzKzvqhIdGAkX1JeX9ouJTgvPzr86iug GvvgCGBPtT1WVdVsnbdvjK07pIAn8EA6aBS5omjfuDqh4oWagymWyNDeibeJYQiC cKxKlOEQAb0D8rzomDHOj3vTaJ/ur8YWA3zQLvjT13XuFxntZktQT2kBIEovVE2g == X-ME-Sender: Received: from [192.168.1.3] (71-212-36-41.tukw.qwest.net [71.212.36.41]) by mail.messagingengine.com (Postfix) with ESMTPA id D931024786; Mon, 12 Feb 2018 18:19:17 -0500 (EST) Subject: Re: pglogical in postgres 9.6 To: greigwise , pgsql-general@postgresql.org References: <1518473478381-0.post@n3.nabble.com> From: Adrian Klaver Message-ID: <8be94335-ed26-d1ad-d480-11e4656cd466@aklaver.com> Date: Mon, 12 Feb 2018 15:19:17 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <1518473478381-0.post@n3.nabble.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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