pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Logical replication
15+ messages / 8 participants
[nested] [flat]

* Logical replication
@ 2017-04-30 16:07  Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 1 reply; 15+ messages in thread

From: Adrian Klaver @ 2017-04-30 16:07 UTC (permalink / raw)
  To: pgsql-general

I have started looking at the logical replication feature in Postgres 
10. One thing I have no been able to determine is the interoperability 
between it and pglogical(www.2ndquadrant.com/en/resources/pglogical/). I 
know the one is derived from the other, what I can not find is whether a 
Postgres 9.4 instance with the pglogical extension installed can 
communicate with a Postgres 10 instance using the built in code?

-- 
Adrian Klaver
adrian.klaver@aklaver.com


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



^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: Logical replication
@ 2017-05-01 14:32  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 1 reply; 15+ messages in thread

From: Adrian Klaver @ 2017-05-01 14:32 UTC (permalink / raw)
  To: pgsql-general

On 04/30/2017 09:07 AM, Adrian Klaver wrote:
> I have started looking at the logical replication feature in Postgres
> 10. One thing I have no been able to determine is the interoperability
> between it and pglogical(www.2ndquadrant.com/en/resources/pglogical/). I
> know the one is derived from the other, what I can not find is whether a
> Postgres 9.4 instance with the pglogical extension installed can
> communicate with a Postgres 10 instance using the built in code?
>

Some testing says the answer is no:

postgres=# CREATE SUBSCRIPTION pgsql10sub CONNECTION 
'dbname=replication_test host=localhost user=postgres port=5412' 
PUBLICATION pgsql94;
ERROR:  could not receive list of replicated tables from the publisher: 
ERROR:  syntax error

If I am correct, this means from 9.4 <--> 10 and points in between you 
would need to use the pglogical extension on both ends. Going from 10 
--> you could use the builtin logical replication. This leads to another 
question. Is is possible to use both at the same time?:

9.4       --->   10(instance 1)    ---> 10(instance 2)
pglogical        pglogical
                  builtin                builtin

-- 
Adrian Klaver
adrian.klaver@aklaver.com


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



^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: Logical replication
@ 2017-05-01 16:25  Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  parent: Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 1 reply; 15+ messages in thread

From: Peter Eisentraut @ 2017-05-01 16:25 UTC (permalink / raw)
  To: Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general

On 5/1/17 10:32, Adrian Klaver wrote:
> On 04/30/2017 09:07 AM, Adrian Klaver wrote:
>> I have started looking at the logical replication feature in Postgres
>> 10. One thing I have no been able to determine is the interoperability
>> between it and pglogical(www.2ndquadrant.com/en/resources/pglogical/). I
>> know the one is derived from the other, what I can not find is whether a
>> Postgres 9.4 instance with the pglogical extension installed can
>> communicate with a Postgres 10 instance using the built in code?

> Some testing says the answer is no:

correct

> If I am correct, this means from 9.4 <--> 10 and points in between you 
> would need to use the pglogical extension on both ends.

correct

> Going from 10
> --> you could use the builtin logical replication. This leads to another 
> question. Is is possible to use both at the same time?:
> 
> 9.4       --->   10(instance 1)    ---> 10(instance 2)
> pglogical        pglogical
>                   builtin                builtin

That is possible.

pglogical will continue to exist, so you can also keep using it if you
already have it.

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


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



^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: Logical replication
@ 2017-05-01 16:34  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  0 siblings, 1 reply; 15+ messages in thread

From: Adrian Klaver @ 2017-05-01 16:34 UTC (permalink / raw)
  To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-general

On 05/01/2017 09:25 AM, Peter Eisentraut wrote:
> On 5/1/17 10:32, Adrian Klaver wrote:
>> On 04/30/2017 09:07 AM, Adrian Klaver wrote:
>>> I have started looking at the logical replication feature in Postgres
>>> 10. One thing I have no been able to determine is the interoperability
>>> between it and pglogical(www.2ndquadrant.com/en/resources/pglogical/). I
>>> know the one is derived from the other, what I can not find is whether a
>>> Postgres 9.4 instance with the pglogical extension installed can
>>> communicate with a Postgres 10 instance using the built in code?
>
>> Some testing says the answer is no:
>
> correct
>
>> If I am correct, this means from 9.4 <--> 10 and points in between you
>> would need to use the pglogical extension on both ends.
>
> correct
>
>> Going from 10
>> --> you could use the builtin logical replication. This leads to another
>> question. Is is possible to use both at the same time?:
>>
>> 9.4       --->   10(instance 1)    ---> 10(instance 2)
>> pglogical        pglogical
>>                   builtin                builtin
>
> That is possible.

Thanks for the information.

>
> pglogical will continue to exist, so you can also keep using it if you
> already have it.
>

I tried building the pglogical extension against Postgres 10 and it 
seems that is not possible yet, which tracks the information on the 
pglogical page:

https://www.2ndquadrant.com/en/resources/pglogical/pglogical-installation-instructions/

I went to the GitHub repo:

https://github.com/2ndQuadrant/pglogical

and did not see anything that looks ready for Postgres 10.

Am I missing something or is this something for the future?




-- 
Adrian Klaver
adrian.klaver@aklaver.com


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



^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: Logical replication
@ 2017-05-04 18:05  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 0 replies; 15+ messages in thread

From: Adrian Klaver @ 2017-05-04 18:05 UTC (permalink / raw)
  To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; pgsql-general

On 05/01/2017 09:34 AM, Adrian Klaver wrote:
> On 05/01/2017 09:25 AM, Peter Eisentraut wrote:
>> On 5/1/17 10:32, Adrian Klaver wrote:
>>> On 04/30/2017 09:07 AM, Adrian Klaver wrote:
>>>> I have started looking at the logical replication feature in Postgres
>>>> 10. One thing I have no been able to determine is the interoperability
>>>> between it and
>>>> pglogical(www.2ndquadrant.com/en/resources/pglogical/). I
>>>> know the one is derived from the other, what I can not find is
>>>> whether a
>>>> Postgres 9.4 instance with the pglogical extension installed can
>>>> communicate with a Postgres 10 instance using the built in code?
>>
>>> Some testing says the answer is no:
>>
>> correct
>>
>>> If I am correct, this means from 9.4 <--> 10 and points in between you
>>> would need to use the pglogical extension on both ends.
>>
>> correct
>>
>>> Going from 10
>>> --> you could use the builtin logical replication. This leads to another
>>> question. Is is possible to use both at the same time?:
>>>
>>> 9.4       --->   10(instance 1)    ---> 10(instance 2)
>>> pglogical        pglogical
>>>                   builtin                builtin
>>
>> That is possible.
> 
> Thanks for the information.
> 
>>
>> pglogical will continue to exist, so you can also keep using it if you
>> already have it.
>>
> 
> I tried building the pglogical extension against Postgres 10 and it
> seems that is not possible yet, which tracks the information on the
> pglogical page:
> 
> https://www.2ndquadrant.com/en/resources/pglogical/pglogical-installation-instructions/
> 
> 
> I went to the GitHub repo:
> 
> https://github.com/2ndQuadrant/pglogical
> 
> and did not see anything that looks ready for Postgres 10.
> 
> Am I missing something or is this something for the future?

The present as of now:

https://www.postgresql.org/message-id/CAH%2BGA0o5B89eDJjoKO-yN%3DXQEsC%2BpA2n9LuQPun0EAz9fVcUEA%40ma...


> 
> 
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com


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



^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* logical replication
@ 2019-02-14 09:51  suganthi Sekar <suganthi@uniphore.com>
  0 siblings, 1 reply; 15+ messages in thread

From: suganthi Sekar @ 2019-02-14 09:51 UTC (permalink / raw)
  To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>


Hi Team ,


 Is it possible to do the logical replication  in 2 way (Synchronization)


Example :


server1  :  5 tables  (1,2,3,4,5)

Server 2 :  5 tables  (1,2,3,4,5)


2,3 table data to be replicate from server 1 to  server2

1,5 table data to be replicate  from server 2 to server 1


Regards,

Suganthi Sekar

^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: [External] logical replication
@ 2019-02-14 11:45  Vijaykumar Jain <vjain@opentable.com>
  parent: suganthi Sekar <suganthi@uniphore.com>
  0 siblings, 1 reply; 15+ messages in thread

From: Vijaykumar Jain @ 2019-02-14 11:45 UTC (permalink / raw)
  To: suganthi Sekar <suganthi@uniphore.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

Yes we already do that, provided you take care restrictions of logical
replication as mentioned in the doc.


On Thu, 14 Feb 2019 at 3:25 PM suganthi Sekar <suganthi@uniphore.com> wrote:

>
> Hi Team ,
>
>
>  Is it possible to do the logical replication  in 2 way (Synchronization)
>
>
> Example :
>
>
> server1  :  5 tables  (1,2,3,4,5)
>
> Server 2 :  5 tables  (1,2,3,4,5)
>
>
> 2,3 table data to be replicate from server 1 to  server2
>
> 1,5 table data to be replicate  from server 2 to server 1
>
>
> Regards,
>
> Suganthi Sekar
>
-- 

Regards,
Vijay

^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: [External] logical replication
@ 2019-02-14 12:06  suganthi Sekar <suganthi@uniphore.com>
  parent: Vijaykumar Jain <vjain@opentable.com>
  0 siblings, 1 reply; 15+ messages in thread

From: suganthi Sekar @ 2019-02-14 12:06 UTC (permalink / raw)
  To: Vijaykumar Jain <vjain@opentable.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

Hi Vijay,


 Can you please share the Link (or document)


Regards

Suganthi Sekar

________________________________
From: Vijaykumar Jain <vjain@opentable.com>
Sent: 14 February 2019 17:15:28
To: suganthi Sekar
Cc: pgsql-general@lists.postgresql.org
Subject: Re: [External] logical replication

Yes we already do that, provided you take care restrictions of logical replication as mentioned in the doc.


On Thu, 14 Feb 2019 at 3:25 PM suganthi Sekar <suganthi@uniphore.com<mailto:suganthi@uniphore.com>> wrote:

Hi Team ,


 Is it possible to do the logical replication  in 2 way (Synchronization)


Example :


server1  :  5 tables  (1,2,3,4,5)

Server 2 :  5 tables  (1,2,3,4,5)


2,3 table data to be replicate from server 1 to  server2

1,5 table data to be replicate  from server 2 to server 1


Regards,

Suganthi Sekar

--

Regards,
Vijay

^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: [External] logical replication
@ 2019-02-14 15:10  Vijaykumar Jain <vjain@opentable.com>
  parent: suganthi Sekar <suganthi@uniphore.com>
  0 siblings, 0 replies; 15+ messages in thread

From: Vijaykumar Jain @ 2019-02-14 15:10 UTC (permalink / raw)
  To: suganthi Sekar <suganthi@uniphore.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>

Sure, here it is.
https://www.postgresql.org/docs/10/logical-replication-restrictions.html

Regards,
Vijay


On Thu, Feb 14, 2019 at 5:36 PM suganthi Sekar <suganthi@uniphore.com>
wrote:

> Hi Vijay,
>
>
>  Can you please share the Link (or document)
>
>
> Regards
>
> Suganthi Sekar
> ------------------------------
> *From:* Vijaykumar Jain <vjain@opentable.com>
> *Sent:* 14 February 2019 17:15:28
> *To:* suganthi Sekar
> *Cc:* pgsql-general@lists.postgresql.org
> *Subject:* Re: [External] logical replication
>
> Yes we already do that, provided you take care restrictions of logical
> replication as mentioned in the doc.
>
>
> On Thu, 14 Feb 2019 at 3:25 PM suganthi Sekar <suganthi@uniphore.com>
> wrote:
>
>
> Hi Team ,
>
>
>  Is it possible to do the logical replication  in 2 way (Synchronization)
>
>
> Example :
>
>
> server1  :  5 tables  (1,2,3,4,5)
>
> Server 2 :  5 tables  (1,2,3,4,5)
>
>
> 2,3 table data to be replicate from server 1 to  server2
>
> 1,5 table data to be replicate  from server 2 to server 1
>
>
> Regards,
>
> Suganthi Sekar
>
> --
>
> Regards,
> Vijay
>

^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Logical replication
@ 2020-04-06 13:02  Konireddy Rajashekar <rajkonireddy@gmail.com>
  0 siblings, 1 reply; 15+ messages in thread

From: Konireddy Rajashekar @ 2020-04-06 13:02 UTC (permalink / raw)
  To: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>

Hi Team,

Is there a way or query to measure replication lag on logical replication
setup in terms of time ?

Thanks
Raj

^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: Logical replication
@ 2020-04-06 16:18  Michael Lewis <mlewis@entrata.com>
  parent: Konireddy Rajashekar <rajkonireddy@gmail.com>
  0 siblings, 1 reply; 15+ messages in thread

From: Michael Lewis @ 2020-04-06 16:18 UTC (permalink / raw)
  To: Konireddy Rajashekar <rajkonireddy@gmail.com>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>

There is nothing native to compute this. This was asked a month or so ago.
The best the poster came up with was a regular query on master DB which
updates a timestamptz field. Assuming master and slave have clocks in sync,
it is simple to compute the lag from that.

>

^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: Logical replication
@ 2020-04-07 06:29  Konireddy Rajashekar <rajkonireddy@gmail.com>
  parent: Michael Lewis <mlewis@entrata.com>
  0 siblings, 0 replies; 15+ messages in thread

From: Konireddy Rajashekar @ 2020-04-07 06:29 UTC (permalink / raw)
  To: Michael Lewis <mlewis@entrata.com>; +Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>

Thanks Michael.

On Mon, 6 Apr, 2020, 9:49 PM Michael Lewis, <mlewis@entrata.com> wrote:

> There is nothing native to compute this. This was asked a month or so ago.
> The best the poster came up with was a regular query on master DB which
> updates a timestamptz field. Assuming master and slave have clocks in sync,
> it is simple to compute the lag from that.
>
>>

^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Logical replication
@ 2020-06-17 09:06  Javi Legido <javi@legido.com>
  0 siblings, 1 reply; 15+ messages in thread

From: Javi Legido @ 2020-06-17 09:06 UTC (permalink / raw)
  To: pgsql-general

Good morning.

I'm testing logical replication, but after creating subscription nothing
happens, and I expected replication start.

Details here: https://paste.debian.net/1152451/

Any help will be appreciated.

Thanks.

Javier

^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: Logical replication
@ 2020-06-17 15:27  Joshua Drake <jd@commandprompt.com>
  parent: Javi Legido <javi@legido.com>
  0 siblings, 1 reply; 15+ messages in thread

From: Joshua Drake @ 2020-06-17 15:27 UTC (permalink / raw)
  To: Javi Legido <javi@legido.com>; +Cc: pgsql-general

Javi,

What does your PostgreSQL log say about replication?

JD

On Wed, Jun 17, 2020 at 2:07 AM Javi Legido <javi@legido.com> wrote:

> Good morning.
>
> I'm testing logical replication, but after creating subscription nothing
> happens, and I expected replication start.
>
> Details here: https://paste.debian.net/1152451/
>
> Any help will be appreciated.
>
> Thanks.
>
> Javier
>

^ permalink  raw  reply  [nested|flat] 15+ messages in thread

* Re: Logical replication
@ 2020-06-17 15:45  Javi Legido <javi@legido.com>
  parent: Joshua Drake <jd@commandprompt.com>
  0 siblings, 0 replies; 15+ messages in thread

From: Javi Legido @ 2020-06-17 15:45 UTC (permalink / raw)
  To: Joshua Drake <jd@commandprompt.com>; +Cc: pgsql-general

Many thanks for your reply.

The last line of the subscriber says:

```
2020-06-17 12:48:02.955 UTC [124] LOG:  logical replication apply worker
for subscription "my_subscription" has started
```

Let's keep this on hold for a while, since I guess that it's taking longer
than expected, since it's a quite big database (more than 500 GB).

Currently the pg_stat_replication.state is in 'catchup' for 2h now.

I will reply to this thread as soon as I would have any news.

Thanks again.



On Wed, 17 Jun 2020 at 17:27, Joshua Drake <jd@commandprompt.com> wrote:

> Javi,
>
> What does your PostgreSQL log say about replication?
>
> JD
>
> On Wed, Jun 17, 2020 at 2:07 AM Javi Legido <javi@legido.com> wrote:
>
>> Good morning.
>>
>> I'm testing logical replication, but after creating subscription nothing
>> happens, and I expected replication start.
>>
>> Details here: https://paste.debian.net/1152451/
>>
>> Any help will be appreciated.
>>
>> Thanks.
>>
>> Javier
>>
>

^ permalink  raw  reply  [nested|flat] 15+ messages in thread


end of thread, other threads:[~2020-06-17 15:45 UTC | newest]

Thread overview: 15+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-04-30 16:07 Logical replication Adrian Klaver <adrian.klaver@aklaver.com>
2017-05-01 14:32 ` Adrian Klaver <adrian.klaver@aklaver.com>
2017-05-01 16:25   ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2017-05-01 16:34     ` Adrian Klaver <adrian.klaver@aklaver.com>
2017-05-04 18:05       ` Adrian Klaver <adrian.klaver@aklaver.com>
2019-02-14 09:51 logical replication suganthi Sekar <suganthi@uniphore.com>
2019-02-14 11:45 ` Re: [External] logical replication Vijaykumar Jain <vjain@opentable.com>
2019-02-14 12:06   ` Re: [External] logical replication suganthi Sekar <suganthi@uniphore.com>
2019-02-14 15:10     ` Re: [External] logical replication Vijaykumar Jain <vjain@opentable.com>
2020-04-06 13:02 Logical replication Konireddy Rajashekar <rajkonireddy@gmail.com>
2020-04-06 16:18 ` Michael Lewis <mlewis@entrata.com>
2020-04-07 06:29   ` Konireddy Rajashekar <rajkonireddy@gmail.com>
2020-06-17 09:06 Logical replication Javi Legido <javi@legido.com>
2020-06-17 15:27 ` Joshua Drake <jd@commandprompt.com>
2020-06-17 15:45   ` Javi Legido <javi@legido.com>

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