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 1mRLJF-0000Eg-J6 for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Sep 2021 21:22:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mRLJE-0002eS-Hd for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Sep 2021 21:22:12 +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 1mRLJD-0002eI-N7 for pgsql-hackers@lists.postgresql.org; Fri, 17 Sep 2021 21:22:12 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mRLJA-0002vN-9L for pgsql-hackers@lists.postgresql.org; Fri, 17 Sep 2021 21:22:11 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id D6A985C0117; Fri, 17 Sep 2021 17:22:04 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 17 Sep 2021 17:22:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=LAd1mO+SuKGEb4sb0SeAx6zI3vWDcYUqgupu/9828kw=; b=jyG+d7YU ibRH5ijoyhe7uOAwmIiLdUQwYkmMWW86W7aCB9/ePSnJnqsEVYQ1ZAUq898XcUO2 IKRonV+bBgQbx8DGi2D0eJojONuT29cZLS+PtRVTQXZYlNpmpUXbjoqRsXLzhuB0 Ew5uHHj7MXBtdUfDUiOZYCcrvSvCwDnc3YoklLpR7Y3VtGMKspXGqpzxWiNUBdaU eSyhgaSzJx2Tsih+0L5DLd96C4L6/NgO/F165tiKOXOoR3lWbGeR/wZMfsXwMnJy A1kgTlKnb/H/NIdRTZPDMyp2cvH/40Qdz2drAqdnqWSBuSXNZMlo8QQOgsO3NpxM pIni3f1wzzw9XA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudehiedgudehhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkgggtugfgjgesthekredttddtjeenucfhrhhomheptehlvhgr rhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh eqnecuggftrfgrthhtvghrnhepudejveejffejveduudetvdekieeuiedtvdeileefkeev jedufeeguedvjefhueelnecuffhomhgrihhnpegvnhhtvghrphhrihhsvggusgdrtghomh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhv hhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 17 Sep 2021 17:22:03 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 20E0C2A083F; Fri, 17 Sep 2021 18:22:00 -0300 (-03) Date: Fri, 17 Sep 2021 18:22:00 -0300 From: Alvaro Herrera To: "Bossart, Nathan" Cc: Kyotaro Horiguchi , "andres@anarazel.de" , "masao.fujii@oss.nttdata.com" , "pgsql-hackers@lists.postgresql.org" , "mengjuan.cmj@alibaba-inc.com" , "Jakub.Wartak@tomtom.com" Subject: Re: prevent immature WAL streaming Message-ID: <202109172122.y3kcil5qhfpy@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Sep-17, Bossart, Nathan wrote: > > That was the first implementation, a few versions of the patch ago. An > > added benefit of a separate WAL record is that you can carry additional > > data for validation, such as -- as suggested by Andres -- the CRC of the > > partial data contained in the message that we're skipping. I didn't > > implement that, but it should be trivial to add it. > > I see. IMO feels a bit counterintuitive to validate a partial record > that you are ignoring anyway, but I suppose it's still valuable to > know when the WAL is badly broken. It's not expensive, and it doesn't > add a ton of complexity, either. Yeah, we don't have any WAL record history validation other than the verifying the LSN of the previous record; I suppose in this particular case you could argue that we shouldn't bother with any validation either. But it seems safer to do it. It doesn't hurt anything anyway. -- Álvaro Herrera Valdivia, Chile — https://www.EnterpriseDB.com/