Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rS8As-00BbSg-Ib for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Jan 2024 04:14:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rS8Ao-009DNB-Qx for pgsql-hackers@arkaria.postgresql.org; Tue, 23 Jan 2024 04:14:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rS8Ao-009DN3-7p for pgsql-hackers@lists.postgresql.org; Tue, 23 Jan 2024 04:14:06 +0000 Received: from mail-ot1-x32e.google.com ([2607:f8b0:4864:20::32e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rS8Ak-002tsK-6P for pgsql-hackers@lists.postgresql.org; Tue, 23 Jan 2024 04:14:05 +0000 Received: by mail-ot1-x32e.google.com with SMTP id 46e09a7af769-6e0d86d4659so2751285a34.1 for ; Mon, 22 Jan 2024 20:14:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705983241; x=1706588041; darn=lists.postgresql.org; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:from:subject:cc:to:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=x2WoaDAqKRom8fObECGFEK4+T2jIqMzdzSkM/zOETZw=; b=j8JFeC5jPNZCtbG5aKVz3vOv0Tn/rPzkj87JhO8c/bdYxnsyJM6UrXI8BpzNjdKdW5 SslZH2B1Dz899wC7gubDvuQj6scASpR8jciNUhGxAbtBoRWsYPhhn6zTtZIdGMznfM0S a6G6nd31ClTrpLQsB63ZMdNFgPK3TYSNBa5jsFeCqgXoE99Y/ZRtSIj9mGRXEFrfxhQa vuBGzpTSv1pOg/7h4tMiioOSVS8uvAKu7zYliTzRHByhsgVvDpy3T4vOJOkA+gdXsInf JItbiL+t0UbKqQOXqvNOlw+8QWsTXQ1K5J9sZowjP92SvVA0+dXMZo6z7VoyXdUDAcKW SZsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705983241; x=1706588041; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:from:subject:cc:to:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=x2WoaDAqKRom8fObECGFEK4+T2jIqMzdzSkM/zOETZw=; b=ZZ3cfEPibp5PUTOMAha4bpO6YybnM1d8zG3uHYuvYORUQvu/mBLrmn1pbQecyKRBI9 PjgAJoixq48XLfJTgzDdeiyh2wXiJTiiF3nCN4N5cdtBPbe5hIOKW12HTD6XFxpJfVje X2+ocj58NIQpKCeobm9SaArsa7r533Olek2oHsJ/yB9j192b9U3TIgGCT9OhK6bHSQ+x PNBaQwgv+YD70dRsL1B7jL88ic9gtGbPkQdMAsvNxLKI1b/x7LcKAPeUmB+wj55LCdk2 2XomR5HNLZFXAAGhoI1VZkk3cBlIzaWhfE74PdTaGiDOzFyVRZqbxKckjoOnW4F3deLP rDDw== X-Gm-Message-State: AOJu0Yy16MtbwbAchU3DgfhSVNS4s2gNmQBI6ZAkko2QUEOqInbzXyoo 7suk0LKkOBV6MtAoJcqeh7UIjVvu5cqnyjVuVIqzh3V3aHqFvV+F X-Google-Smtp-Source: AGHT+IFEa+gIVY41zeMTu9uFHPeaB5T1Jr2Vl7290dwf3EJEWBvahbkrNdv4rEvvVWZMUMk084UdTg== X-Received: by 2002:a05:6808:190e:b0:3bd:97c2:af91 with SMTP id bf14-20020a056808190e00b003bd97c2af91mr6927421oib.91.1705983241348; Mon, 22 Jan 2024 20:14:01 -0800 (PST) Received: from localhost (KD036014041111.ppp-bb.dion.ne.jp. [36.14.41.111]) by smtp.gmail.com with ESMTPSA id u6-20020a056a00124600b006dbc5569599sm6567995pfi.10.2024.01.22.20.13.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 20:14:00 -0800 (PST) Date: Tue, 23 Jan 2024 13:13:56 +0900 (JST) Message-Id: <20240123.131356.1249290340476643043.horikyota.ntt@gmail.com> To: michael@paquier.xyz Cc: aleksander@timescale.com, pgsql-hackers@lists.postgresql.org, vignesh21@gmail.com, stark.cfm@gmail.com, alvherre@alvh.no-ip.org, pryzby@telsasoft.com, andres@anarazel.de, ashu.coek88@gmail.com, pashkin.elfe@gmail.com, bossartn@amazon.com, david@pgmasters.net, peter.eisentraut@2ndquadrant.com, jtc331@gmail.com, robertmhaas@gmail.com Subject: Re: Make mesage at end-of-recovery less scary. From: Kyotaro Horiguchi In-Reply-To: References: <20240116.115703.2298339297458587094.horikyota.ntt@gmail.com> User-Agent: Mew version 6.8 on Emacs 27.2 Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Tue_Jan_23_13_13_56_2024_752)--" Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ----Next_Part(Tue_Jan_23_13_13_56_2024_752)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit At Wed, 17 Jan 2024 14:32:00 +0900, Michael Paquier wrote in > On Tue, Jan 16, 2024 at 02:46:02PM +0300, Aleksander Alekseev wrote: > >> For now, let me explain the basis for this patch. The fundamental > >> issue is that these warnings that always appear are, in practice, not > >> a problem in almost all cases. Some of those who encounter them for > >> the first time may feel uneasy and reach out with inquiries. On the > >> other hand, those familiar with these warnings tend to ignore them and > >> only pay attention to details when actual issues arise. Therefore, the > >> intention of this patch is to label them as "no issue" unless a > >> problem is blatantly evident, in order to prevent unnecessary concern. > > > > I agree and don't mind affecting the error message per se. > > > > However I see that the actual logic of how WAL is processed is being > > changed. If we do this, at very least it requires thorough thinking. I > > strongly suspect that the proposed code is wrong and/or not safe > > and/or less safe than it is now for the reasons named above. > > FWIW, that pretty much sums up my feeling regarding this patch, > because an error, basically any error, would hurt back very badly. > Sure, the error messages we generate now when reaching the end of WAL > can sound scary, and they are (I suspect that's not really the case > for anybody who has history doing support with PostgreSQL because a > bunch of these messages are old enough to vote, but I can understand > that anybody would freak out the first time they see that). > > However, per the recent issues we've had in this area, like > cd7f19da3468 but I'm more thinking about 6b18b3fe2c2f and > bae868caf222, I am of the opinion that the header validation, the > empty page case in XLogReaderValidatePageHeader() and the record read > changes are risky enough that I am not convinced that the gains are > worth the risks taken. > > The error stack in the WAL reader is complicated enough that making it > more complicated as the patch proposes does not sound like not a good > tradeoff to me to make the reports related to the end of WAL cleaner > for the end-user. I agree that we should do something, but the patch > does not seem like a good step towards this goal. Perhaps somebody > would be more excited about this proposal than I am, of course. Thank you both for the comments. The criticism seems valid. The approach to identifying the end-of-WAL state in this patch is quite heuristic, and its validity or safety can certainly be contested. On the other hand, if we seek perfection in this area of judgment, we may need to have the WAL format itself more robust. In any case, since the majority of the feedback on this patch seems to be negative, I am going to withdraw it if no supportive opinions emerge during this commit-fest. The attached patch addresses the errors reported by CF-bot. regards. -- Kyotaro Horiguchi NTT Open Source Software Center ----Next_Part(Tue_Jan_23_13_13_56_2024_752)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="v29-0001-Make-End-Of-Recovery-error-less-scary.patch"