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 1j7b1z-0006D3-3D for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Feb 2020 08:29:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j7b1x-00023D-JF for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Feb 2020 08:29:57 +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 1j7b1x-000235-7o for pgsql-hackers@lists.postgresql.org; Fri, 28 Feb 2020 08:29:57 +0000 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j7b1u-0005WP-Lv for pgsql-hackers@lists.postgresql.org; Fri, 28 Feb 2020 08:29:56 +0000 Received: by mail-pf1-x432.google.com with SMTP id i6so1362355pfc.1 for ; Fri, 28 Feb 2020 00:29:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:to:cc:subject:from:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=TWYJRsTVMe6+RmdmpQX+toeuiEQMYbSpjl+6H/jazSg=; b=DkCT17ZYJG9W5aey2QcM8eQaU4Dr+Gul+VCE/OpzOWzZNAQX5PqkpLa7y0jfgWhYBq 8/G6xhteEFFQOgOHu8rh8N0kdTb8HLzL0lkNq0FM28yypE0vyzX4tpotMOx6+hL97LT7 0oO/fR+/x3h/YECK+3iJ/jfnMDzJNkvtL5CR314Q994UX+AeTwRK3iF3zxN7sgguYqJP irTQDN8do1BZgoR1MRm+S2e80/NBQVzYKJFPaBATjKNO5q5iRftcYcjrVjTbxqfVxQVE o/caRj9bX2XztD44mFAMiC/fVfLmSSYgxFQZQHcl0V1kMupEL86+ZaTtt7YSnlvAamG1 rr/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:to:cc:subject:from:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=TWYJRsTVMe6+RmdmpQX+toeuiEQMYbSpjl+6H/jazSg=; b=TCqfUrUH2v4B9nA0d2tm+EUWas+93pHPQ1dfjS689UB/1/DS4hvF3F6bsOLtUn4p80 UX5IFhxdcHxi2/2Yxe+UXA76Rk8ou4owkGfOMa1qtKARO21wujNoo7IYNdWgw09f9FDE 4OjIfqkXqKrRd+6CsTSmBTviTNV3iVCHSCW/VhokhVYrbHmV9vRXXfHUs1CKb4KWfsCU hw1wsGxxTHZYRrOLsLUuno5qiCMULytcX6c1rmBoIoEjXR2K/hAFydgxtCY+ids3w5SF vnMdR+LkUI+MM1RPdA68GvRIpqWQ+kOjK6ngii7q+w5FhnJfGDEdFtkesyHnM3ZYXvEJ ktUQ== X-Gm-Message-State: APjAAAWwEetCYRW9UxXttLM1Z6Zbb0tWS32lTH1/neEGoFBLeWzgoH0R +nbHihzsJWU7dxxcF4kLnao= X-Google-Smtp-Source: APXvYqwCDJHZ7xbn8uW+wrCV49WJl1PEJGTzz0WvPppY/6JauvVA3ImHuFxATZD6L89CATybGJoaSw== X-Received: by 2002:a63:6203:: with SMTP id w3mr3545592pgb.35.1582878591113; Fri, 28 Feb 2020 00:29:51 -0800 (PST) Received: from localhost (w196209.dynamic.ppp.asahi-net.or.jp. [121.1.196.209]) by smtp.gmail.com with ESMTPSA id t17sm9321654pgn.94.2020.02.28.00.29.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Feb 2020 00:29:50 -0800 (PST) Date: Fri, 28 Feb 2020 17:28:06 +0900 (JST) Message-Id: <20200228.172806.1107809554616271723.horikyota.ntt@gmail.com> To: michael@paquier.xyz Cc: pgsql-hackers@lists.postgresql.org Subject: Re: Make mesage at end-of-recovery less scary. From: Kyotaro Horiguchi In-Reply-To: <20200228073318.GD2688@paquier.xyz> References: <20200228.160100.2210969269596489579.horikyota.ntt@gmail.com> <20200228073318.GD2688@paquier.xyz> User-Agent: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thank you for the comments. At Fri, 28 Feb 2020 16:33:18 +0900, Michael Paquier wrote in > On Fri, Feb 28, 2020 at 04:01:00PM +0900, Kyotaro Horiguchi wrote: > > Hello, this is a followup thread of [1]. > > > > # I didn't noticed that the thread didn't cover -hackers.. > > > > When recovery of any type ends, we see several kinds of error messages > > that says "WAL is broken". > > Have you considered an error context here? Your patch leads to a bit > of duplication with the message a bit down of what you are changing > where the end of local pg_wal is reached. It is a DEBUG message and it is for the time moving from crash recovery to archive recovery. I could remove that but decided to leave it for tracability. > > + * reached the end of WAL. Otherwise something's really wrong and > > + * we report just only the errormsg if any. If we don't receive > > This sentence sounds strange to me. Or you meant "Something is wrong, > so use errormsg as report if it is set"? The whole comment there follows. | recovery. If we get here during recovery, we can assume that we | reached the end of WAL. Otherwise something's really wrong and | we report just only the errormsg if any. If we don't receive | errormsg here, we already logged something. We don't emit | "reached end of WAL" in muted messages. "Othhersise" means "other than the case of recovery". "Just only the errmsg" means "show the message not as a part the message "reached end of WAL". > > + * Note: errormsg is alreay translated. > > Typo here. Thanks. Will fix along with "rached". > > + if (StandbyMode) > > + ereport(actual_emode, > > + (errmsg ("rached end of WAL at %X/%X on timeline %u in %s during streaming replication", > > StandbyMode happens also with only WAL archiving, depending on if > primary_conninfo is set or not. Right. I'll fix it. Maybe to "during standby mode". > > + (errmsg ("rached end of WAL at %X/%X on timeline %u in %s during crash recovery", > > FWIW, you are introducing three times the same typo, in the same > word, in three different messages. They're copy-pasto. I refrained from constructing an error message from multiple nonindipendent parts. Are you suggesting to do so? regards. -- Kyotaro Horiguchi NTT Open Source Software Center