Re: [COMMITTERS] pgsql: Logical replication support for initial data copy

2017-03-27 Thread Masahiko Sawada
On Fri, Mar 24, 2017 at 12:59 AM, Peter Eisentraut
 wrote:
> On 3/23/17 10:25, Petr Jelinek wrote:
>> On 23/03/17 15:17, Stephen Frost wrote:
>>> Petr,
>>>
>>> * Petr Jelinek (petr.jeli...@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.
>
> Also fixed.
>

The copyright in some files(tablesync.c and pg_subscriptiion_rel.h)
introduced by this commit are old. Is that intentional? Attached
patch.

Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


update_copyright.patch
Description: Binary data

-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Logical replication support for initial data copy

2017-03-23 Thread Peter Eisentraut
On 3/23/17 10:25, Petr Jelinek wrote:
> On 23/03/17 15:17, Stephen Frost wrote:
>> Petr,
>>
>> * Petr Jelinek (petr.jeli...@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.

Also fixed.

-- 
Peter Eisentraut  http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Logical replication support for initial data copy

2017-03-23 Thread Peter Eisentraut
On 3/23/17 10:12, Petr Jelinek 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.

Fixed.

-- 
Peter Eisentraut  http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Logical replication support for initial data copy

2017-03-23 Thread Petr Jelinek
On 23/03/17 15:17, Stephen Frost wrote:
> Petr,
> 
> * Petr Jelinek (petr.jeli...@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
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 AlterSubscriptionStmt *from)
 {
 	AlterSubscriptionStmt *newnode = makeNode(AlterSubscriptionStmt);
 
+	COPY_SCALAR_FIELD(kind);
 	COPY_STRING_FIELD(subname);
+	COPY_STRING_FIELD(conninfo);
+	COPY_NODE_FIELD(publication);
 	COPY_NODE_FIELD(options);
 
 	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);
 
 	return true;
diff --git a/src/include/replication/walreceiver.h b/src/include/replication/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;
 
 /*
diff --git a/src/include/replication/worker_internal.h b/src/include/replication/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;
 
 /* Memory context for cached variables in apply worker. */
-MemoryContext			ApplyCacheContext;
+extern MemoryContextApplyCacheContext;
 
 /* libpqreceiver connection */
 extern struct WalReceiverConn	   *wrconn;

-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Logical replication support for initial data copy

2017-03-23 Thread Stephen Frost
Petr,

* Petr Jelinek (petr.jeli...@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..

Thanks!

Stephen


signature.asc
Description: Digital signature


Re: [COMMITTERS] pgsql: Logical replication support for initial data copy

2017-03-23 Thread Petr Jelinek
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.

-- 
  Petr Jelinek  http://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training & Services
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 AlterSubscriptionStmt *from)
 {
 	AlterSubscriptionStmt *newnode = makeNode(AlterSubscriptionStmt);
 
+	COPY_SCALAR_FIELD(kind);
 	COPY_STRING_FIELD(subname);
+	COPY_STRING_FIELD(conninfo);
+	COPY_NODE_FIELD(publication);
 	COPY_NODE_FIELD(options);
 
 	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);
 
 	return true;
diff --git a/src/include/replication/worker_internal.h b/src/include/replication/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;
 
 /* Memory context for cached variables in apply worker. */
-MemoryContext			ApplyCacheContext;
+extern MemoryContextApplyCacheContext;
 
 /* libpqreceiver connection */
 extern struct WalReceiverConn	   *wrconn;

-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Logical replication support for initial data copy

2017-03-23 Thread Petr Jelinek
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.

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


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Logical replication

2017-01-21 Thread Andres Freund
On 2017-01-21 09:49:28 +0530, Amit Kapila wrote:
> On Fri, Jan 20, 2017 at 7:36 PM, Peter Eisentraut  wrote:
> > Logical replication
> >
> > - Add PUBLICATION catalogs and DDL
> > - Add SUBSCRIPTION catalog and DDL
> > - Define logical replication protocol and output plugin
> > - Add logical replication workers
> >
> > From: Petr Jelinek 
> > Reviewed-by: Steve Singer 
> > Reviewed-by: Andres Freund 
> > Reviewed-by: Erik Rijkers 
> > Reviewed-by: Peter Eisentraut 

> Great work, Congrats Peter Jelinek and Thanks to all involved.
> Getting a feature of this magnitude deserves a big round of applause.

Seconded! Or fourthed ;)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Logical replication

2017-01-20 Thread Pavel Stehule
2017-01-21 6:56 GMT+01:00 Amit Langote :

> On Sat, Jan 21, 2017 at 1:19 PM, Amit Kapila 
> wrote:
> > On Fri, Jan 20, 2017 at 7:36 PM, Peter Eisentraut 
> wrote:
> >> Logical replication
> >>
> >> - Add PUBLICATION catalogs and DDL
> >> - Add SUBSCRIPTION catalog and DDL
> >> - Define logical replication protocol and output plugin
> >> - Add logical replication workers
> >>
> >> From: Petr Jelinek 
> >> Reviewed-by: Steve Singer 
> >> Reviewed-by: Andres Freund 
> >> Reviewed-by: Erik Rijkers 
> >> Reviewed-by: Peter Eisentraut 
> >>
> >>
> > ..
> >> 119 files changed, 13354 insertions(+), 95 deletions(-)
> >>
> >
> >
> > Great work, Congrats Peter Jelinek and Thanks to all involved.
> > Getting a feature of this magnitude deserves a big round of applause.
>
> +1, congrats!
>

+1 pretty big work is done!

Pavel

>
> Thanks,
> Amit
>
>
> --
> Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-committers
>


Re: [COMMITTERS] pgsql: Logical replication

2017-01-20 Thread Amit Langote
On Sat, Jan 21, 2017 at 1:19 PM, Amit Kapila  wrote:
> On Fri, Jan 20, 2017 at 7:36 PM, Peter Eisentraut  wrote:
>> Logical replication
>>
>> - Add PUBLICATION catalogs and DDL
>> - Add SUBSCRIPTION catalog and DDL
>> - Define logical replication protocol and output plugin
>> - Add logical replication workers
>>
>> From: Petr Jelinek 
>> Reviewed-by: Steve Singer 
>> Reviewed-by: Andres Freund 
>> Reviewed-by: Erik Rijkers 
>> Reviewed-by: Peter Eisentraut 
>>
>>
> ..
>> 119 files changed, 13354 insertions(+), 95 deletions(-)
>>
>
>
> Great work, Congrats Peter Jelinek and Thanks to all involved.
> Getting a feature of this magnitude deserves a big round of applause.

+1, congrats!

Thanks,
Amit


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Logical replication

2017-01-20 Thread Amit Kapila
On Fri, Jan 20, 2017 at 7:36 PM, Peter Eisentraut  wrote:
> Logical replication
>
> - Add PUBLICATION catalogs and DDL
> - Add SUBSCRIPTION catalog and DDL
> - Define logical replication protocol and output plugin
> - Add logical replication workers
>
> From: Petr Jelinek 
> Reviewed-by: Steve Singer 
> Reviewed-by: Andres Freund 
> Reviewed-by: Erik Rijkers 
> Reviewed-by: Peter Eisentraut 
>
>
..
> 119 files changed, 13354 insertions(+), 95 deletions(-)
>


Great work, Congrats Peter Jelinek and Thanks to all involved.
Getting a feature of this magnitude deserves a big round of applause.


-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


Re: [COMMITTERS] pgsql: Logical replication

2017-01-20 Thread Stephen Frost
* Peter Eisentraut (pete...@gmx.net) wrote:
> Logical replication
> 
> - Add PUBLICATION catalogs and DDL
> - Add SUBSCRIPTION catalog and DDL
> - Define logical replication protocol and output plugin
> - Add logical replication workers

The buildfarm is rather upset with this.

Looks like an issue in pg_upgrade / pg_dump.

Thanks!

Stephen


signature.asc
Description: Digital signature