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 1mQCf9-00033t-Jg for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Sep 2021 17:56:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mQCf8-0006l2-Bk for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Sep 2021 17:56:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mQCf7-0006ku-DG for pgsql-hackers@lists.postgresql.org; Tue, 14 Sep 2021 17:56:06 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mQCf2-0000Cq-Kc for pgsql-hackers@lists.postgresql.org; Tue, 14 Sep 2021 17:56:04 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 327625C0088; Tue, 14 Sep 2021 13:55:59 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 14 Sep 2021 13:55:59 -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=+n10dse/OgkK8GtJsCWLAI3NH5opq0InKqybZpscD9A=; b=mEZpfP3H amiT+0CpaCwz/X4TtsOJy0lY493nG5iUSir5SzwJNp7knYwwfgV/K+co02LLSXCm rZKfxj2nyMSMwE0ecSPIkID7jkMoBHuTO/b4/8c9NTazMJ7v2WtyeeewjkJqJvlt f8ukqiMruVBTCAqlPhxkpFdNihmjR326OnSyIADjtuMAsaClo4vaRj0hDbr2ODz5 +tb4X8Yl42SALvJYsCHVtNdg1GTr2z/gZyfWTzTUZpym46HcRQkDjRoKEMwS/Uiw +mOTIPv1rQN3Z1466u0VJd4+Y5ZLcgpkHP12aF6PnKeVOEVFMnFXYHQhtPNfDfE8 vPoYj/jfvdk2Fg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudegledgudduiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfggtggugfgjsehtke ertddttdejnecuhfhrohhmpeetlhhvrghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhr vgesrghlvhhhrdhnohdqihhprdhorhhgqeenucggtffrrghtthgvrhhnpeekkeffgffhtd ffueetjeehtdehgeekleejkeeiveevgefhhffhtefggedvjefhheenucffohhmrghinhep vghnthgvrhhprhhishgvuggsrdgtohhmpdgsuhhrnhhinhhgsghirhgurdhnvghtnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghr rhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 14 Sep 2021 13:55:56 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 74D232A0868; Tue, 14 Sep 2021 14:55:53 -0300 (-03) Date: Tue, 14 Sep 2021 14:55:53 -0300 From: Alvaro Herrera To: Kyotaro Horiguchi Cc: bossartn@amazon.com, 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: <202109141755.r4ivg6an5pfp@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210908.160346.600467027279024119.horikyota.ntt@gmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Sep-08, Kyotaro Horiguchi wrote: > Thanks! As my understanding the new record add the ability to > cross-check between a teard-off contrecord and the new record inserted > after the teard-off record. I didn't test the version by myself but > the previous version implemented the essential machinery and that > won't change fundamentally by the new record. > > So I think the current patch deserves to see the algorithm actually > works against the problem. Here's a version with the new record type. It passes check-world, and it seems to work correctly to prevent overwrite of the tail end of a segment containing a broken record. This is very much WIP still; comments are missing and I haven't tried to implement any sort of verification that the record being aborted is the right one. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "XML!" Exclaimed C++. "What are you doing here? You're not a programming language." "Tell that to the people who use me," said XML. https://burningbird.net/the-parable-of-the-languages/