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 1jGT4b-0007D8-G2 for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Mar 2020 19:49:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jGT4a-0000tB-Bn for pgsql-hackers@arkaria.postgresql.org; Mon, 23 Mar 2020 19:49:20 +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 1jGT33-0006Do-DB for pgsql-hackers@lists.postgresql.org; Mon, 23 Mar 2020 19:47:45 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jGT2w-0004Ce-S8 for pgsql-hackers@lists.postgresql.org; Mon, 23 Mar 2020 19:47:44 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 2827F5C0209; Mon, 23 Mar 2020 15:47:38 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 23 Mar 2020 15:47:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=4BzZbhK0htIXAhiJswc6iZP/UpV ZEtXW7bqwYqwXP+o=; b=duGNRPv3/RWT8INOAAXWJcPeXLQCuP3AndAzJOCLJyL MzywY8inENEuDFQ1mngGhqqTOX47PvKWr5+pS446+/ZutbfeeSPKIoEVgh3thEzP wtYmuon0WR5lADtpVIdx8kjNRbibE1U5WeqMxEZBq1Z+ds2PNWvvZXQg8lnEzedE QK31xTq6Nt8p9PiObgKHWCXzsTZrse7RtzaVBF3FmdWWOAj26gvLy/nGgA7QuGvj Mg2Rd7lrToreKhyEgaqxlDdgyQD/CiycQLA6ViKs8Fhe71ZeRwWmKSciBlSwzdun nGDz7ytdkezdvWAHs3AZp0cIUpl7QPIWTx3WxwDRc/g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=4BzZbh K0htIXAhiJswc6iZP/UpVZEtXW7bqwYqwXP+o=; b=nFsMe/c9cMryS5Gw5srLU4 /7s6L8OSJAH4cHjVrC4MD2+p+HoSyOfM5FFV2FoGUpMzIR3Ft86cpoOQZhoWsjg5 XA8AqJU7Yvk+3vfFsPkitU90cWpguGgpxFxB9dR7fHAm3naCxW4sdXKaVi+aU5vN 8aFQ+2PJnxJNS+s5eus304g16NxN6IeKAI9H+isPwW+C71Wfq2SkjgJojF2ynHfu Q50Gl8l35CofrtiYoBLPjUD1+jSAB1jSiYgkzo54LwXUJPxABcB64mZTY9mLzMo7 Jb98oEdjx0xrRq6UBN1cXJpiERyj9bVjIz88y2N0O/2l6AYQhcr/QbAz8GjCQ0cg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudegkedguddvkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecukfhppe eijedrudeitddrvddujedrvdehtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgr mhepmhgrihhlfhhrohhmpegrnhgurhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Received: from intern.anarazel.de (c-67-160-217-250.hsd1.ca.comcast.net [67.160.217.250]) by mail.messagingengine.com (Postfix) with ESMTPA id 93C593280063; Mon, 23 Mar 2020 15:47:37 -0400 (EDT) Date: Mon, 23 Mar 2020 12:47:36 -0700 From: Andres Freund To: Peter Eisentraut Cc: Kyotaro Horiguchi , michael@paquier.xyz, pgsql-hackers@lists.postgresql.org Subject: Re: Make mesage at end-of-recovery less scary. Message-ID: <20200323194736.uijmupfle2ccvyah@alap3.anarazel.de> References: <20200228.160100.2210969269596489579.horikyota.ntt@gmail.com> <20200228073318.GD2688@paquier.xyz> <20200228.172806.1107809554616271723.horikyota.ntt@gmail.com> <20200305.160650.1027844943773682801.horikyota.ntt@gmail.com> <4a9fc5b1-34c8-46ec-9b71-d4763d70311d@2ndquadrant.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4a9fc5b1-34c8-46ec-9b71-d4763d70311d@2ndquadrant.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2020-03-23 10:37:16 +0100, Peter Eisentraut wrote: > On 2020-03-05 08:06, Kyotaro Horiguchi wrote: > > | [20866] LOG: replication terminated by primary server > > | [20866] DETAIL: End of WAL reached on timeline 1 at 0/30001C8. > > | [20866] FATAL: could not send end-of-streaming message to primary: no COPY in progress IMO it's a bug that we see this FATAL. I seem to recall that we didn't use to get that? > > | [20851] LOG: reached end of WAL at 0/30001C8 on timeline 1 in archive during standby mode > > | [20851] DETAIL: invalid record length at 0/30001C8: wanted 24, got 0 > > > > I changed the above to the below, which looks more adequate. > > > > | [24271] LOG: replication terminated by primary server on timeline 1 at 0/3000240. > > | [24271] FATAL: could not send end-of-streaming message to primary: no COPY in progress > > | [24267] LOG: reached end of WAL at 0/3000240 on timeline 1 in archive during standby mode > > | [24267] DETAIL: invalid record length at 0/3000240: wanted 24, got 0 > > Is this the before and after? That doesn't seem like a substantial > improvement to me. You still get the "scary" message at the end. It seems like a minor improvement - folding the DETAIL into the message makes sense to me here. But it indeed doesn't really address the main issue. I think we don't want to elide the information about how the end of the WAL was detected - there are some issues where I found that quite helpful. But we could reformulate it to be clearer that it's informative output, not a bug. E.g. something roughly like LOG: reached end of WAL at 0/3000240 on timeline 1 in archive during standby mode DETAIL: End detected due to invalid record length at 0/3000240: expected 24, got 0 (I first elided the position in the DETAIL, but it could differ from the one in LOG) I don't find that very satisfying, but I can't come up with something that provides the current information, while being less scary than my suggestion? Greetings, Andres Freund