Pgsql 16 to 14 using builtin logical

Started by Durgamahesh Manneover 1 year ago8 messagesgeneral
Jump to latest
#1Durgamahesh Manne
maheshpostgres9@gmail.com

Hi

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

Regards
Durga Mahesh

#2Asad Ali
asadalinagri@gmail.com
In reply to: Durgamahesh Manne (#1)
Re: Pgsql 16 to 14 using builtin logical

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

On Sat, Oct 26, 2024, 8:28 AM Durgamahesh Manne <maheshpostgres9@gmail.com>
wrote:

Show quoted text

Hi

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

Regards
Durga Mahesh

#3Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Asad Ali (#2)
Re: Pgsql 16 to 14 using builtin logical

On 10/25/24 23:02, Asad Ali wrote:

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.

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
<maheshpostgres9@gmail.com <mailto:maheshpostgres9@gmail.com>> wrote:

Hi

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

Regards
Durga Mahesh

--
Adrian Klaver
adrian.klaver@aklaver.com

#4Asad Ali
asadalinagri@gmail.com
In reply to: Adrian Klaver (#3)
Re: Pgsql 16 to 14 using builtin logical

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

On Sat, Oct 26, 2024, 9:10 PM Adrian Klaver <adrian.klaver@aklaver.com>
wrote:

Show quoted text

On 10/25/24 23:02, Asad Ali wrote:

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.

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
<maheshpostgres9@gmail.com <mailto:maheshpostgres9@gmail.com>> wrote:

Hi

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

Regards
Durga Mahesh

--
Adrian Klaver
adrian.klaver@aklaver.com

#5Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Asad Ali (#4)
Re: Pgsql 16 to 14 using builtin logical

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."

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

--
Adrian Klaver
adrian.klaver@aklaver.com

#6Asad Ali
asadalinagri@gmail.com
In reply to: Adrian Klaver (#5)
Re: Pgsql 16 to 14 using builtin logical

I missed to mentioned in the last.

On Sat, Oct 26, 2024, 10:51 PM Adrian Klaver <adrian.klaver@aklaver.com>
wrote:

Show quoted text

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."

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

--
Adrian Klaver
adrian.klaver@aklaver.com

#7Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Asad Ali (#6)
Re: Pgsql 16 to 14 using builtin logical

On 10/26/24 11:38, Asad Ali wrote:

I missed to mentioned in the last.

?

--
Adrian Klaver
adrian.klaver@aklaver.com

#8rajesh kumar
vallarapurajesh@gmail.com
In reply to: Adrian Klaver (#7)
Re: Pgsql 16 to 14 using builtin logical

I have tested it around 3 - 4 years ago.
Logical replication is backward compatible as well.

So 16 to 14 does work :)

On Sat, Oct 26, 2024, 17:16 Adrian Klaver <adrian.klaver@aklaver.com> wrote:

Show quoted text

On 10/26/24 11:38, Asad Ali wrote:

I missed to mentioned in the last.

?

--
Adrian Klaver
adrian.klaver@aklaver.com