Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mXLTM-0001Z6-2h for pgsql-general@arkaria.postgresql.org; Mon, 04 Oct 2021 10:45:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mXLTL-0008L3-23 for pgsql-general@arkaria.postgresql.org; Mon, 04 Oct 2021 10:45:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mXLTK-0008Kv-PS for pgsql-general@lists.postgresql.org; Mon, 04 Oct 2021 10:45:26 +0000 Received: from mail3.conversis.de ([213.203.208.210]) by magus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mXLTI-00064H-TV for pgsql-general@lists.postgresql.org; Mon, 04 Oct 2021 10:45:26 +0000 Received: from [192.168.0.122] (ip-84-119-134-0.unity-media.net [84.119.134.0]) by mail4.conversis.de (Postfix) with ESMTPSA id A72CDE1A77 for ; Mon, 4 Oct 2021 12:45:24 +0200 (CEST) Message-ID: <58e5afde-47f5-25a0-9e43-b4937d416635@conversis.de> Date: Mon, 4 Oct 2021 12:45:24 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.2 Subject: Re: Why would Postgres 11 suddenly ignore the recovery.conf file? Content-Language: en-US To: pgsql-general@lists.postgresql.org References: From: Dennis Jacobfeuerborn In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/4/21 12:35, Dennis Jacobfeuerborn wrote: > Hi, > I just stopped and restarted a Postgres 11 docker container which so far > has happily streamed the WAL from its primary but after the restart it > now seems to completely ignore the recovery.conf file and just outputs > this: > >  2021-10-04 10:14:19.103 UTC [1] LOG:  listening on IPv4 address > "0.0.0.0", port 5432 > 2021-10-04 10:14:19.103 UTC [1] LOG:  listening on IPv6 address "::", > port 5432 > 2021-10-04 10:14:19.123 UTC [1] LOG:  listening on Unix socket > "/var/run/postgresql/.s.PGSQL.5432" > 2021-10-04 10:14:19.304 UTC [21] LOG:  database system was shut down in > recovery at 2021-10-04 10:14:11 UTC > 2021-10-04 10:14:19.305 UTC [21] LOG:  entering standby mode > 2021-10-04 10:14:19.313 UTC [21] LOG:  could not signal for checkpoint: > checkpointer is not running > 2021-10-04 10:14:19.338 UTC [21] LOG:  redo starts at 2F01/B9044C30 > 2021-10-04 10:15:35.889 UTC [21] LOG:  consistent recovery state reached > at 2F02/A2E1A108 > 2021-10-04 10:15:35.893 UTC [1] LOG:  database system is ready to accept > read only connections > > Notice that there is apparently no attempt being made to connect to the > primary any more. The recovery.conf file is still present and correct so > I don't understand why Postgres seems to ignore it completely? Ok, so just as I sent the mail the log now showed this: 2021-10-04 10:37:53.841 UTC [45] LOG: started streaming WAL from primary at 2F14/13000000 on timeline 1 Notice that it took over 20 minutes for the system to start streaming. Could this be a connection related issue? If so is there a way to see that Postgres is trying to connect to the primary but hasn't succeeded yet? From the looks of it the logs stays silent until is actually has started streaming and there is no "initiating recovery" message before the connection actually succeeds. Regards, Dennis