Re: Logical replication from PG v13 and below to PG v14 (devel version) is not working.

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Subject: Re: Logical replication from PG v13 and below to PG v14 (devel version) is not working.
Date: 2020-09-21 10:43:07
Message-ID: CALj2ACWpSNSfQUQV22WVKyFvueVRYJ5qyiAy-aL39KCrD-dfvA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Sep 21, 2020 at 3:26 PM Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com> wrote:
>
> commit 464824323e57dc4b397e8b05854d779908b55304
> Author: Amit Kapila <akapila(at)postgresql(dot)org>
> Date: Thu Sep 3 07:54:07 2020 +0530
>
> Above select query produces no result. When this experiment is
> performed below the mentioned git commit, it works fine.
>

I encountered the same issue. We get to see below error during table
sync phase in the subscriber server logs.

2020-09-21 16:01:45.794 IST [782428] LOG: logical replication apply
worker for subscription "pg2pg_sub" has started
2020-09-21 16:01:45.799 IST [782428] ERROR: could not start WAL
streaming: ERROR: client sent proto_version=2 but we only support
protocol 1 or lower
CONTEXT: slot "pg2pg_sub", output plugin "pgoutput", in the
startup callback
2020-09-21 16:01:45.800 IST [781607] LOG: background worker "logical
replication worker" (PID 782428) exited with exit code 1

>
> After spending some time looking into this issue, I observed that
> above git commit has bumped the logical replication protocol version.
> Due to this, the logical replication apply worker process is unable to
> do WAL streaming which causes it to terminate. Therefore, the data
> inserted in the publication table is not applied on the subscription
> table (i.e. no data replication happens)
>

That's because the above commit changed LOGICALREP_PROTO_VERSION_NUM
to 2 from 1.

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2020-09-21 10:45:06 Re: Logical replication from PG v13 and below to PG v14 (devel version) is not working.
Previous Message Amit Kapila 2020-09-21 10:20:25 Re: VACUUM PARALLEL option vs. max_parallel_maintenance_workers