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.92) (envelope-from ) id 1jCJfR-0006HH-Mg for pgsql-bugs@arkaria.postgresql.org; Thu, 12 Mar 2020 08:58:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jCJfO-000842-GX for pgsql-bugs@arkaria.postgresql.org; Thu, 12 Mar 2020 08:58:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jCJfO-00083v-8K for pgsql-bugs@lists.postgresql.org; Thu, 12 Mar 2020 08:58:10 +0000 Received: from excelsior.roeckx.be ([195.234.45.115]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jCJfL-0004Yq-Rt for pgsql-bugs@lists.postgresql.org; Thu, 12 Mar 2020 08:58:09 +0000 Received: from intrepid.roeckx.be (localhost [127.0.0.1]) by excelsior.roeckx.be (Postfix) with ESMTP id D327DA8A0607 for ; Thu, 12 Mar 2020 08:58:05 +0000 (UTC) Received: by intrepid.roeckx.be (Postfix, from userid 1000) id 9A59C1FE0CC1; Thu, 12 Mar 2020 09:58:05 +0100 (CET) Date: Thu, 12 Mar 2020 09:58:05 +0100 From: Kurt Roeckx To: pgsql-bugs@lists.postgresql.org Subject: Streaming replication doesn't restart after timeout Message-ID: <20200312085805.GA3811492@roeckx.be> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, I've just set up streaming replication, and the walreceiver got a timeout and doesn't seem to start again. This is the log on the slave: 2020-03-10 14:22:44.459 CET [9075] LOG: entering standby mode 2020-03-10 14:22:44.768 CET [9075] LOG: redo starts at 21C/25B67338 2020-03-11 04:54:24.365 CET [9075] LOG: consistent recovery state reached at 237/7114CF60 2020-03-11 04:54:24.375 CET [7974] LOG: database system is ready to accept read only connections 2020-03-11 04:54:26.136 CET [3776] LOG: started streaming WAL from primary at 237/72000000 on timeline 1 2020-03-12 05:03:00.965 CET [3776] FATAL: terminating walreceiver due to timeout This is on the server side: 2020-03-12 05:02:58.099 CET [19433] replication@[unknown] LOG: terminating walsender process due to replication timeout The last few wal files on the slave are: -rw------- 1 postgres postgres 16777216 Mar 12 05:01 0000000100000287000000E5 -rw------- 1 postgres postgres 16777216 Mar 12 05:01 0000000100000287000000E6 -rw------- 1 postgres postgres 16777216 Mar 12 05:01 0000000100000287000000E7 -rw------- 1 postgres postgres 16777216 Mar 12 05:01 0000000100000287000000E8 -rw------- 1 postgres postgres 16777216 Mar 12 05:01 0000000100000287000000E9 -rw------- 1 postgres postgres 16777216 Mar 12 05:01 0000000100000287000000EA -rw------- 1 postgres postgres 16777216 Mar 12 05:01 0000000100000287000000EB -rw------- 1 postgres postgres 16777216 Mar 12 05:01 0000000100000287000000EC -rw------- 1 postgres postgres 16777216 Mar 12 05:02 0000000100000287000000ED The slave has not catched up with the master yet. During the initial recovery it also didn't download any wal files. It just processed the wal files pg_basebackup downloaded during the backup. So between 2020-03-10 14:22:44 and 2020-03-11 04:54:24 it didn't download any wal files. It's still not finished processing the wal files it has received. Is it only going to start downloading new wal files once it has processed all the previous wal files it downloaded? I was expecting it to restart. Kurt