Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1go4Ag-0007iN-4n for pgsql-general@arkaria.postgresql.org; Mon, 28 Jan 2019 10:29:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1go4Ad-0003iv-QW for pgsql-general@arkaria.postgresql.org; Mon, 28 Jan 2019 10:29:39 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1go4Ad-0003io-Ft for pgsql-general@lists.postgresql.org; Mon, 28 Jan 2019 10:29:39 +0000 Received: from hermes.gatewaynet.com ([193.92.121.98]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1go4AZ-0008OD-SV for pgsql-general@lists.postgresql.org; Mon, 28 Jan 2019 10:29:38 +0000 Received: from smadev.internal.net (pc131.internal.net [10.9.200.131]) by hermes.gatewaynet.com (8.14.3/8.14.3/Debian-9.4) with ESMTP id x0SATP9X012707 for ; Mon, 28 Jan 2019 12:29:30 +0200 Received: from smadev.internal.net (smadev [10.9.200.131]) by smadev.internal.net (8.15.2/8.15.2) with ESMTP id x0SATPGX028988 for ; Mon, 28 Jan 2019 12:29:25 +0200 (EET) (envelope-from achill@matrix.gatewaynet.com) Subject: Re: logical replication problem To: pgsql-general@lists.postgresql.org References: From: Achilleas Mantzios Message-ID: <1ec6ae6e-0a78-214c-9dab-551c22b8b89c@matrix.gatewaynet.com> Date: Mon, 28 Jan 2019 12:29:25 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.3.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Virus-Scanned: clamav-milter 0.98.7 at hermes X-Virus-Status: Clean X-Spam-Status: No, score=-29.0 required=5.0 tests=ALL_TRUSTED,DYN_HAM_COORD, DYN_HAM_IT,DYN_HAM_NAUTICAL autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on hermes.gatewaynet.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 28/1/19 12:12 μ.μ., Thomas Schweikle wrote: > Hi! > > Setup: > > - db-server_A on port 5432 > - db-server_B on port 5433 > > on db-server_A: > postgres=# \dRp > Liste der Publikationen > Name | Eigentümer | Alle Tabellen | Inserts | Updates | Deletes > ------+------------+---------------+---------+---------+--------- > mig1 | postgres | t | t | t | t > > on db-server_B: > postgres=# \dRs > Liste der Subskriptionen > Name | Eigentümer | Eingeschaltet | Publikation > ------+------------+---------------+------------- > sub1 | postgres | t | {mig1} > > in db-server_A pg_hba.conf: > local replication postgres peer > host replication postgres 127.0.0.1/32 ident > host replication postgres ::1/128 ident > > on db-server_A: > postgres# CREATE PUBLICATION mig1 FOR ALL TABLES; > CREATE PUBLICATION > > the command on db-server_B: > postgres# CREATE SUBSCRIPTION sub1 CONNECTION 'host=127.0.0.1 > port=5432 dbname=mydb user=postgres PUBLICATION mig1; > NOTICE: created replication slot "sub1" on publisher > CREATE SUBSCRIPTION > > worked as expected. > But: instead of starting replication I find Errors within db-server_B logs: > 2019-01-24 10:57:58.549 CET [28956] LOG: Apply-Worker für logische > Replikation für Subskription »sub1« hat gestartet > 2019-01-24 10:57:58.553 CET [28956] FEHLER: konnte keine Daten vom > WAL-Stream empfangen: FEHLER: Publikation »mig1« existiert nicht > KONTEXT: Slot »sub1«, Ausgabe-Plugin »pgoutput«, im Callback > change, zugehörige LSN 47/B4BCA2A8 > 2019-01-24 10:57:58.554 CET [5982] LOG: Background-Worker »logical > replication worker« (PID 28956) beendete mit Status 1 It could help if your logs were in English, anyways any error prior to that? Closely monitoring the subscription node is very important. Any error could stall / pause logical replication. > > Configuration was set on both servers to include > wal_level = logical > > Any ideas why this does not work as expected? Any further ideas what > to prove on db-server_A and db-server_B? > > -- Achilleas Mantzios IT DEV Lead IT DEPT Dynacom Tankers Mgmt