Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cr3gH-00038v-HQ for pgsql-committers@arkaria.postgresql.org; Thu, 23 Mar 2017 14:25:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cr3gH-0004uH-3w for pgsql-committers@arkaria.postgresql.org; Thu, 23 Mar 2017 14:25:37 +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 1cr3g1-0003XL-CY for pgsql-committers@postgresql.org; Thu, 23 Mar 2017 14:25:21 +0000 Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cr3fy-0004f5-JZ for pgsql-committers@postgresql.org; Thu, 23 Mar 2017 14:25:20 +0000 Received: by mail-wm0-x236.google.com with SMTP id n11so62561615wma.1 for ; Thu, 23 Mar 2017 07:25:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to; bh=t0PzI7LJO6arKY+oDerhCBrqPNir1YlzRXyyMxecfq4=; b=lx5BIkwkgrGnScCLMAuesp91OOwmv8csLtaQHyzGKjN0fQIVoEtMjgdUACgL3GbASu gwq2JyVf0DmIFIyjEc+SO5GpiQASV3HF36PVXFwu9yML4+jPyatZLAlRX5+SCm3QbES/ LNW2l7i7aFS8T1rDcT/XC/jkxNcBga1zOX+CA5M7vnNZeUYbdaW29N5HH2AUJ8eGHoFs PEPqxai6wwWkTWUC9BHS5ROaM+jwUIYoP9MLj0mJymZdPUMJdMm/2pnJhH9JpS4vE3dC cg57z6H4XyKeUe0xLBAkf9B4tVuyf8qF/ZOx3K7uLEZbUx5COu6WlyIxJnQ1Vp6kEIZV euaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to; bh=t0PzI7LJO6arKY+oDerhCBrqPNir1YlzRXyyMxecfq4=; b=NiOjZP4QhSgWzHBtoe++LYUgcfl7zz5BT6e5VPfoLGSKNu/ibgZ9ol9k+hjGOeMesP EpKNplH1pz7FJ4OOH4sYIqwuMTHfkSH4hU6Gzdv73gQHYfFyyviPaEfj1DUxOLKpwcHZ VMlhhJdzFxH0DfF4NhEdiG+E231y2NKQQ6qPq/Kz57FFgXy4vVTM4GCJ9vcdG+bSXh4P R6ocHd6sLk6x2tTFqBBaKxvQIyWmhnYdS+j6MPRfHz0PVYQmCc3UMuPguLDFHgtKBW51 +Fm/CFvP4PhlCeJK0O7VrwWsFM4JBdRyzbsD0mgPTT3RA0Z0UYY42MRgOcFQ9eHIvcVK ZQxQ== X-Gm-Message-State: AFeK/H0aIyQk0W8Ss9YV2iYS6O5lSKIADYMfDKt2aSpVaIeu/bUmvdbwvd200N+Th7Jb3etLYlYW8iOhPC/OTc54DxD6iIqI4V8aoy5ZKCVGyFItx5lKr7g+gUwG+KVt6S+/l4AB2Nnh6PQqfbFatnaLtEkDd22VQmJJcwIPzcdxPAKhkQFV7dmdkSa3Voyjg5F7l9BHQkxMX6hU X-Received: by 10.28.210.212 with SMTP id j203mr12623630wmg.93.1490279116786; Thu, 23 Mar 2017 07:25:16 -0700 (PDT) Received: from [192.168.0.105] (150.123.broadband11.iol.cz. [90.178.123.150]) by smtp.gmail.com with ESMTPSA id k32sm1058553wre.18.2017.03.23.07.25.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Mar 2017 07:25:15 -0700 (PDT) Subject: Re: pgsql: Logical replication support for initial data copy To: Stephen Frost References: <1384e2bb-64b4-2e62-4ac3-4b873a059799@2ndquadrant.com> <20170323141735.GS9812@tamriel.snowman.net> Cc: Peter Eisentraut , pgsql-committers@postgresql.org From: Petr Jelinek Message-ID: <8573bded-a414-b184-93cd-5952800ce3f8@2ndquadrant.com> Date: Thu, 23 Mar 2017 15:25:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170323141735.GS9812@tamriel.snowman.net> Content-Type: multipart/mixed; boundary="------------BFEBDBBC1D770C732251477E" X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-committers Precedence: bulk Sender: pgsql-committers-owner@postgresql.org This is a multi-part message in MIME format. --------------BFEBDBBC1D770C732251477E Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit On 23/03/17 15:17, Stephen Frost wrote: > Petr, > > * Petr Jelinek (petr.jelinek@2ndquadrant.com) wrote: >> On 23/03/17 14:47, Petr Jelinek wrote: >>> I am looking into buildfarm failures. >>> >>> Looks like the clang issue (mylodon, longfin) is because we are missing >>> extern in include/replication/worker_internal.h for ApplyCacheContext. >>> >>> Still analyzing the rest. >> >> Ah missing fields in copy/equal function for AlterSubscriptionStmt. >> >> Attached patch adds the above mentioned extern and fixes the copy and >> equal functions. > > Pretty sure I saw a complaint about a trailing comma in a struct or enum > too.. > Ah, missed that in the wall of text, thanks, fixed that too. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services --------------BFEBDBBC1D770C732251477E Content-Type: text/x-patch; name="logical-replication-copy-patch-fixesv2.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="logical-replication-copy-patch-fixesv2.patch" diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index 67c7de6..93d4eb2 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -4450,7 +4450,10 @@ _copyAlterSubscriptionStmt(const AlterSubscriptionSt= mt *from) { AlterSubscriptionStmt *newnode =3D makeNode(AlterSubscriptionStmt); =20 + COPY_SCALAR_FIELD(kind); COPY_STRING_FIELD(subname); + COPY_STRING_FIELD(conninfo); + COPY_NODE_FIELD(publication); COPY_NODE_FIELD(options); =20 return newnode; diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c index 4d8e7fe..6b40b56 100644 --- a/src/backend/nodes/equalfuncs.c +++ b/src/backend/nodes/equalfuncs.c @@ -2199,7 +2199,10 @@ static bool _equalAlterSubscriptionStmt(const AlterSubscriptionStmt *a, const AlterSubscriptionStmt *b) { + COMPARE_SCALAR_FIELD(kind); COMPARE_STRING_FIELD(subname); + COMPARE_STRING_FIELD(conninfo); + COMPARE_NODE_FIELD(publication); COMPARE_NODE_FIELD(options); =20 return true; diff --git a/src/include/replication/walreceiver.h b/src/include/replicatio= n/walreceiver.h index fb55c30..cc31bc6 100644 --- a/src/include/replication/walreceiver.h +++ b/src/include/replication/walreceiver.h @@ -175,7 +175,7 @@ typedef enum WALRCV_OK_TUPLES, /* Query returned tuples. */ WALRCV_OK_COPY_IN, /* Query started COPY FROM. */ WALRCV_OK_COPY_OUT, /* Query started COPY TO. */ - WALRCV_OK_COPY_BOTH, /* Query started COPY BOTH replication protocol. */ + WALRCV_OK_COPY_BOTH /* Query started COPY BOTH replication protocol. */ } WalRcvExecStatus; =20 /* diff --git a/src/include/replication/worker_internal.h b/src/include/replic= ation/worker_internal.h index bf96d34..5bebca3 100644 --- a/src/include/replication/worker_internal.h +++ b/src/include/replication/worker_internal.h @@ -46,7 +46,7 @@ typedef struct LogicalRepWorker } LogicalRepWorker; =20 /* Memory context for cached variables in apply worker. */ -MemoryContext ApplyCacheContext; +extern MemoryContext ApplyCacheContext; =20 /* libpqreceiver connection */ extern struct WalReceiverConn *wrconn; --------------BFEBDBBC1D770C732251477E Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers --------------BFEBDBBC1D770C732251477E--