From: | PG Bug reporting form <noreply(at)postgresql(dot)org> |
---|---|
To: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Cc: | henry(dot)hinze(at)googlemail(dot)com |
Subject: | BUG #16643: PG13 - Logical replication - initial startup never finishes and gets stuck in startup loop |
Date: | 2020-09-29 19:46:59 |
Message-ID: | 16643-eaadeb2a1a58d28c@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged on the website:
Bug reference: 16643
Logged by: Henry Hinze
Email address: henry(dot)hinze(at)googlemail(dot)com
PostgreSQL version: 13.0
Operating system: Ubuntu 20.04
Description:
The following setup of logical replication for one table works nicely with
PG 12.4. In PG 13.0 the initial startup never finishes. Instead it starts
over and over again.
All settings are default except for wal_level which was changed to
"logical".
To replicate:
-- Create 2 Databases
psql
CREATE DATABASE d1;
CREATE DATABASE d2;
-- In d1: Create table, fill with data, create publication, create
replication slot
psql d1
CREATE TABLE t (f int);
INSERT INTO t SELECT * FROM generate_series(1, 10000000);
ALTER TABLE t ADD PRIMARY KEY (f);
CREATE PUBLICATION p;
ALTER PUBLICATION p ADD TABLE t;
SELECT pg_create_logical_replication_slot('my_slot','pgoutput');
-- In d2: Create table, create subscription
psql d2
CREATE TABLE t (f int);
ALTER TABLE t ADD PRIMARY KEY (f);
CREATE SUBSCRIPTION s CONNECTION 'user=postgres dbname=d1' PUBLICATION p
WITH (create_slot = false, slot_name='my_slot');
Here are the Logs:
**********************
2020-09-29 21:27:13.267 CEST [17178] postgres(at)d1 LOG: logical decoding
found consistent point at 0/33CDDBB8
2020-09-29 21:27:13.267 CEST [17178] postgres(at)d1 DETAIL: There are no
running transactions.
2020-09-29 21:27:13.267 CEST [17178] postgres(at)d1 STATEMENT: select
pg_create_logical_replication_slot('my_slot','pgoutput');
2020-09-29 21:27:37.543 CEST [17229] LOG: logical replication apply worker
for subscription "s" has started
2020-09-29 21:27:37.548 CEST [17230] postgres(at)d1 LOG: starting logical
decoding for slot "my_slot"
2020-09-29 21:27:37.548 CEST [17230] postgres(at)d1 DETAIL: Streaming
transactions committing after 0/33CDDBF0, reading WAL from 0/33CDDBB8.
2020-09-29 21:27:37.548 CEST [17230] postgres(at)d1 LOG: logical decoding
found consistent point at 0/33CDDBB8
2020-09-29 21:27:37.548 CEST [17230] postgres(at)d1 DETAIL: There are no
running transactions.
2020-09-29 21:27:37.552 CEST [17231] LOG: logical replication table
synchronization worker for subscription "s", table "t" has started
2020-09-29 21:27:37.704 CEST [17232] postgres(at)d1 LOG: logical decoding
found consistent point at 0/33D49208
2020-09-29 21:27:37.704 CEST [17232] postgres(at)d1 DETAIL: There are no
running transactions.
2020-09-29 21:27:58.888 CEST [17232] postgres(at)d1 LOG: starting logical
decoding for slot "my_slot_16398_sync_16393"
2020-09-29 21:27:58.888 CEST [17232] postgres(at)d1 DETAIL: Streaming
transactions committing after 0/33D49240, reading WAL from 0/33D49208.
2020-09-29 21:27:58.888 CEST [17232] postgres(at)d1 LOG: logical decoding
found consistent point at 0/33D49208
2020-09-29 21:27:58.888 CEST [17232] postgres(at)d1 DETAIL: There are no
running transactions.
2020-09-29 21:28:05.138 CEST [17231] ERROR: error reading result of
streaming command:
2020-09-29 21:28:05.143 CEST [17130] LOG: background worker "logical
replication worker" (PID 17231) exited with exit code 1
2020-09-29 21:28:05.145 CEST [17256] LOG: logical replication table
synchronization worker for subscription "s", table "t" has started
2020-09-29 21:28:05.222 CEST [17257] postgres(at)d1 LOG: logical decoding
found consistent point at 0/62FBD4E8
2020-09-29 21:28:05.222 CEST [17257] postgres(at)d1 DETAIL: There are no
running transactions.
2020-09-29 21:28:49.187 CEST [17257] postgres(at)d1 LOG: starting logical
decoding for slot "my_slot_16398_sync_16393"
2020-09-29 21:28:49.187 CEST [17257] postgres(at)d1 DETAIL: Streaming
transactions committing after 0/62FBD520, reading WAL from 0/62FBD4E8.
2020-09-29 21:28:49.187 CEST [17257] postgres(at)d1 LOG: logical decoding
found consistent point at 0/62FBD4E8
2020-09-29 21:28:49.187 CEST [17257] postgres(at)d1 DETAIL: There are no
running transactions.
2020-09-29 21:28:55.672 CEST [17256] ERROR: error reading result of
streaming command:
2020-09-29 21:28:55.676 CEST [17130] LOG: background worker "logical
replication worker" (PID 17256) exited with exit code 1
2020-09-29 21:28:55.679 CEST [17308] LOG: logical replication table
synchronization worker for subscription "s", table "t" has started
2020-09-29 21:28:55.833 CEST [17309] postgres(at)d1 LOG: logical decoding
found consistent point at 0/9E9AEA38
2020-09-29 21:28:55.833 CEST [17309] postgres(at)d1 DETAIL: There are no
running transactions.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2020-09-29 20:09:20 | Re: BUG #16643: PG13 - Logical replication - initial startup never finishes and gets stuck in startup loop |
Previous Message | Nagaraj Raj | 2020-09-29 18:24:41 | Re: table partition with inheritance having current_timestamp issue if we miss range table |