Subject: Pgsql 16 to 14 using builtin logical

From: Durgamahesh Manne <[email-masked]>
Date: Sat, 26 Oct 2024 08:58:16 +0530

Hi

Can we replicate 16 to 14 using builtin logical similarly pglogical?

Regards
Durga Mahesh

---

From: Asad Ali <[email-masked]>
Date: Sat, 26 Oct 2024 11:02:11 +0500

Hi Durgamahesh,

Yes, you can replicate a PostgreSQL 16 database to PostgreSQL 14 using
built-in logical replication. PostgreSQL's built-in logical replication
allows for replicating data between different versions of PostgreSQL,
provided the source version is higher than or equal to the target version.

Regards,
Asad

---

From: Adrian Klaver <[email-masked]>
Date: Sat, 26 Oct 2024 09:10:40 -0700

> provided the source version is higher than or equal to the target version.

I am not following or maybe it's just your idea of what is the source 
and what is the target. In the common case of upgrading a database to a 
newer version the logical replication would be from the lower source to 
the higher target.

> 
> Regards,
> Asad
> 
> 
> On Sat, Oct 26, 2024, 8:28 AM Durgamahesh Manne 
> <[email-masked] <mailto:[email-masked]>> wrote:
> 
>     Hi
> 

-- 
Adrian Klaver
[email-masked]

---

From: Asad Ali <[email-masked]>
Date: Sat, 26 Oct 2024 22:06:33 +0500

In the typical upgrade scenario, replication flows from the lower (older)
version to the higher (newer) version. Here, the source is the older
version (e.g., PostgreSQL 14), and the target is the newer version (e.g.,
PostgreSQL 16).

Replicating from a higher version (PostgreSQL 16) to a lower one
(PostgreSQL 14) is possible but unconventional and not usually done for
upgrades.

Best Regards,
Asad Ali

---

From: Adrian Klaver <[email-masked]>
Date: Sat, 26 Oct 2024 10:51:21 -0700

On 10/26/24 10:06, Asad Ali wrote:
> 
> In the typical upgrade scenario, replication flows from the lower 
> (older) version to the higher (newer) version. Here, the source is the 
> older version (e.g., PostgreSQL 14), and the target is the newer version 
> (e.g., PostgreSQL 16).

So how does that fit with your statement?:

"PostgreSQL's built-in logical replication allows for replicating data 
between different versions of PostgreSQL, provided the source version is 
higher than or equal to the target version."