Hi All, Today, while exploring logical replication in PostgreSQL, I noticed that logical replication from PG version 13 and below to PG v14 (development version) is not working. It has stopped working from the following git commit onwards:
commit 464824323e57dc4b397e8b05854d779908b55304 Author: Amit Kapila <akap...@postgresql.org> Date: Thu Sep 3 07:54:07 2020 +0530 Add support for streaming to built-in logical replication. ... ... Here is the experiment that I performed to verify this: Publisher (PG-v12/13): ================== CREATE TABLE pg2pg (id serial PRIMARY KEY, whatever text); INSERT INTO pg2pg (whatever) SELECT 'str-' || i FROM generate_series(1, 5) i; SELECT * FROM pg2pg; CREATE PUBLICATION pg2pg_pub FOR TABLE pg2pg; Subscriber (PG-v14 HEAD or commit 46482432): ===================================== CREATE TABLE pg2pg (id serial PRIMARY KEY, whatever text); CREATE SUBSCRIPTION pg2pg_sub CONNECTION 'host=127.0.0.1 port=5433 dbname=postgres user=ashu' PUBLICATION pg2pg_pub; SELECT * FROM pg2pg; Above select query produces no result. When this experiment is performed below the mentioned git commit, it works fine. 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) -- With Regards, Ashutosh Sharma EnterpriseDB:http://www.enterprisedb.com