pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
PostgreSQL Replication between Different Major Version (11-13)
6+ messages / 6 participants
[nested] [flat]

* PostgreSQL Replication between Different Major Version (11-13)
@ 2021-12-29 12:30  Ram Pratap Maurya <ram.maurya@lavainternational.in>
  0 siblings, 2 replies; 6+ messages in thread

From: Ram Pratap Maurya @ 2021-12-29 12:30 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>; +Cc: Ashish Chugh <ashish.chugh@lavainternational.in>

Hi Support,

We would like to perform PostgreSQL Replication between Different Major Version to avoid database upgrade. Scenario is as follows.


1.       PostgreSQL Replication from PostgreSQL Version 11 To PostgreSQL Version 13.

2.       Want to Setup Production Read Only Replication from Primary (11 Version) To Secondary (13 Version)

We want to perform above activity to avoid Database Upgrade. Please let us know if this is possible to setup Replication between Different Major Version (11-13).


Regards,
Ram Pratap.




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

* RE: PostgreSQL Replication between Different Major Version (11-13)
@ 2021-12-29 12:47  Alvaro Aguayo <aaguayo@opensysperu.com>
  parent: Ram Pratap Maurya <ram.maurya@lavainternational.in>
  1 sibling, 2 replies; 6+ messages in thread

From: Alvaro Aguayo @ 2021-12-29 12:47 UTC (permalink / raw)
  To: Ram Pratap Maurya <ram.maurya@lavainternational.in>; pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>; +Cc: Ashish Chugh <ashish.chugh@lavainternational.in>

Hi.

Not with PostgreSQL itself, but you can achieve that with pglogical: https://www.2ndquadrant.com/en/resources-old/pglogical/

It supports replication across different versions. One of its intended usages is version migration with minimal (almost zero) downtime.

But please note that it won’t create a read only replica: The replica will always be writable. You should look for some way to restrict writing, via triggers or permissions, if you really want the replica to be read only.

Regards,

Alvaro Aguayo
Operations Manager
Jr. Prolongación Ayacucho 177 Urb. Santa Eulalia - San Miguel
Telf. (+51-1) 680-5726
E-mail: aaguayo@ocs.pe

From: Ram Pratap Maurya <ram.maurya@lavainternational.in>
Sent: 29 December 2021 07:31
To: pgsql-admin@lists.postgresql.org
Cc: Ashish Chugh <ashish.chugh@lavainternational.in>
Subject: PostgreSQL Replication between Different Major Version (11-13)

Hi Support,

We would like to perform PostgreSQL Replication between Different Major Version to avoid database upgrade. Scenario is as follows.


  1.  PostgreSQL Replication from PostgreSQL Version 11 To PostgreSQL Version 13.
  2.  Want to Setup Production Read Only Replication from Primary (11 Version) To Secondary (13 Version)

We want to perform above activity to avoid Database Upgrade. Please let us know if this is possible to setup Replication between Different Major Version (11-13).


Regards,
Ram Pratap.




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

* Re: PostgreSQL Replication between Different Major Version (11-13)
@ 2021-12-29 12:58  Adarsh Sharma <eddy.adarsh@gmail.com>
  parent: Alvaro Aguayo <aaguayo@opensysperu.com>
  1 sibling, 0 replies; 6+ messages in thread

From: Adarsh Sharma @ 2021-12-29 12:58 UTC (permalink / raw)
  To: Alvaro Aguayo <aaguayo@opensysperu.com>; +Cc: Ram Pratap Maurya <ram.maurya@lavainternational.in>; pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>; Ashish Chugh <ashish.chugh@lavainternational.in>

Is it recommended to use pglogical for PostgreSQL 9.6 -> PostgreSQL 12
Upgrade?
I have the similar use case but wondering if there are known issues or
things to watch out for before using pglogical for setting replication
across different PostgreSQL version.

On Wed, Dec 29, 2021 at 6:17 PM Alvaro Aguayo <aaguayo@opensysperu.com>
wrote:

> Hi.
>
>
>
> Not with PostgreSQL itself, but you can achieve that with pglogical:
> https://www.2ndquadrant.com/en/resources-old/pglogical/
>
>
>
> It supports replication across different versions. One of its intended
> usages is version migration with minimal (almost zero) downtime.
>
>
>
> But please note that it won’t create a read only replica: The replica will
> always be writable. You should look for some way to restrict writing, via
> triggers or permissions, if you really want the replica to be read only.
>
>
>
> Regards,
>
>
>
> *Alvaro Aguayo*
>
> Operations Manager
>
> Jr. Prolongación Ayacucho 177 Urb. Santa Eulalia - San Miguel
>
> Telf. (+51-1) 680-5726
>
> E-mail: aaguayo@ocs.pe
>
>
>

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

* Re: PostgreSQL Replication between Different Major Version (11-13)
@ 2021-12-29 13:27  Magnus Hagander <magnus@hagander.net>
  parent: Alvaro Aguayo <aaguayo@opensysperu.com>
  1 sibling, 1 reply; 6+ messages in thread

From: Magnus Hagander @ 2021-12-29 13:27 UTC (permalink / raw)
  To: Alvaro Aguayo <aaguayo@opensysperu.com>; +Cc: Ram Pratap Maurya <ram.maurya@lavainternational.in>; pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>; Ashish Chugh <ashish.chugh@lavainternational.in>

On Wed, Dec 29, 2021 at 1:47 PM Alvaro Aguayo <aaguayo@opensysperu.com> wrote:
>
> Hi.
>
>
>
> Not with PostgreSQL itself, but you can achieve that with pglogical: https://www.2ndquadrant.com/en/resources-old/pglogical/

Sure, you can do that with PostgreSQL itself as well, with logical
replication, as of version 10. It has the same caveats as with
pglogical, but the basic functionality is there.

You cannot do it with *physical* replication, that's still true.

-- 
 Magnus Hagander
 Me: https://www.hagander.net/
 Work: https://www.redpill-linpro.com/





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

* Re: PostgreSQL Replication between Different Major Version (11-13)
@ 2021-12-29 16:00  Magnus Rolf <magnus.rolf@outlook.com>
  parent: Magnus Hagander <magnus@hagander.net>
  0 siblings, 0 replies; 6+ messages in thread

From: Magnus Rolf @ 2021-12-29 16:00 UTC (permalink / raw)
  To: Magnus Hagander <magnus@hagander.net>; Alvaro Aguayo <aaguayo@opensysperu.com>; +Cc: Ram Pratap Maurya <ram.maurya@lavainternational.in>; pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>; Ashish Chugh <ashish.chugh@lavainternational.in>

Just use the build in logical replication of PostgreSQL. It works perfectly between PG v-11 and PG v-13.
Only requirement is each table must have a primary key to assure data object consistency and integrity.
Tables which are not updated by client tool (archive tables) might be migrated by using normal pgdump/psql or pg_restore.

Magnus Rolf

Outlook voor Android downloaden<https://aka.ms/ghei36;
________________________________
From: Magnus Hagander <magnus@hagander.net>
Sent: Wednesday, December 29, 2021 2:27:36 PM
To: Alvaro Aguayo <aaguayo@opensysperu.com>
Cc: Ram Pratap Maurya <ram.maurya@lavainternational.in>; pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>; Ashish Chugh <ashish.chugh@lavainternational.in>
Subject: Re: PostgreSQL Replication between Different Major Version (11-13)

On Wed, Dec 29, 2021 at 1:47 PM Alvaro Aguayo <aaguayo@opensysperu.com> wrote:
>
> Hi.
>
>
>
> Not with PostgreSQL itself, but you can achieve that with pglogical: https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.2ndquadrant.com%2Fen%2Fresour...

Sure, you can do that with PostgreSQL itself as well, with logical
replication, as of version 10. It has the same caveats as with
pglogical, but the basic functionality is there.

You cannot do it with *physical* replication, that's still true.

--
 Magnus Hagander
 Me: https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.hagander.net%2F&amp;data=...
 Work: https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.redpill-linpro.com%2F&amp...

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

* Re: PostgreSQL Replication between Different Major Version (11-13)
@ 2021-12-29 17:00  Scott Ribe <scott_ribe@elevated-dev.com>
  parent: Ram Pratap Maurya <ram.maurya@lavainternational.in>
  1 sibling, 0 replies; 6+ messages in thread

From: Scott Ribe @ 2021-12-29 17:00 UTC (permalink / raw)
  To: Ram Pratap Maurya <ram.maurya@lavainternational.in>; +Cc: pgsql-admin@lists.postgresql.org <pgsql-admin@lists.postgresql.org>; Ashish Chugh <ashish.chugh@lavainternational.in>

> On Dec 29, 2021, at 5:30 AM, Ram Pratap Maurya <ram.maurya@lavainternational.in> wrote:
> 
> We want to perform above activity to avoid Database Upgrade. Please let us know if this is possible to setup Replication between Different Major Version (11-13).

You might also try a trial with pg_upgrade -k on a copy of your database. You might find that it's fast enough that the complexity of logical replication is not worth it.








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


end of thread, other threads:[~2021-12-29 17:00 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-12-29 12:30 PostgreSQL Replication between Different Major Version (11-13) Ram Pratap Maurya <ram.maurya@lavainternational.in>
2021-12-29 12:47 ` Alvaro Aguayo <aaguayo@opensysperu.com>
2021-12-29 12:58   ` Adarsh Sharma <eddy.adarsh@gmail.com>
2021-12-29 13:27   ` Magnus Hagander <magnus@hagander.net>
2021-12-29 16:00     ` Magnus Rolf <magnus.rolf@outlook.com>
2021-12-29 17:00 ` Scott Ribe <scott_ribe@elevated-dev.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