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 1njBAK-0004KW-Aj for pgsql-hackers@arkaria.postgresql.org; Tue, 26 Apr 2022 02:43:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1njBAJ-0008RU-5Q for pgsql-hackers@arkaria.postgresql.org; Tue, 26 Apr 2022 02:42:59 +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 1njBAI-0008RL-S2 for pgsql-hackers@lists.postgresql.org; Tue, 26 Apr 2022 02:42:58 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1njBAG-0006y8-Do for pgsql-hackers@postgresql.org; Tue, 26 Apr 2022 02:42:58 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id A0F803200935; Mon, 25 Apr 2022 22:42:53 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Mon, 25 Apr 2022 22:42:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; t=1650940973; x=1651027373; bh=8mRNv7W8sE khGFVbADcE/DUTSWPX5lv58h5ctDiTNyI=; b=nV2ZZcfokD9zc257l09+8HDN8m Z4mKOtR/Vp6O/1YtHsomdxY4yW44P/+XYpBsF2kPQ6lKq2nT9TC9VNRkUf0YgZcW L1S74GO05R92nTJf7oDQWxT1/uITfFdtRTh2FI8rXzVt+5wHoZajTnq9bLcdt7I0 jCNd149e22Hk9FqXpQhzYjd2iiVV8FnyjTA2g+am9fYY8t2zZ+5cB0e7oRx+cKch hmXsO9+p1dYHCkf73ZNX92yZKBke5qbroJ6OVM2Da2tytiTQAgod2EjEcsYkjABz /DjgDQ6q1L5wh+MzQSPCQkEmbhwLMRBS2CeC6SkPqn3eLMyjHKeWNSpl+O4g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1650940973; x= 1651027373; bh=8mRNv7W8sEkhGFVbADcE/DUTSWPX5lv58h5ctDiTNyI=; b=W eTsjwd25qZ1pJm3XX7rrJ+EFmev36PC3624LS3l/5hSqeEGA7PZjLjeUr8UsJvjw HER9TKjLNXZvuoHVEEAbEQ4sAarA0Z/WIlDggotO9K/WKzlG3ZxylONrIgW/PaHV RoMWhv2g4rDKqUwew0By8geGtlndHl83we1qICdubG4M0p6Ds5J3btCk//Yd25aU /WRE/Tabr5HWy9l3YhmJiVGx2FqWUQjCzT50Em4Ced3YJgpB+NZSDVa6EdDfGaa1 tp07UWMBNupjuel2CItlKMAwzcZUozw1SUsusXUDoLQybEKjAMaILE/U3P6UQ11w W1L4V7UgKtQx5nWZC54Sw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedruddvgdehlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdefhedmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeetleeifedufffhhfdtteelgeeg geffhfekueevteeigfduudevudetgfegiedvjeenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 25 Apr 2022 22:42:51 -0400 (EDT) Date: Tue, 26 Apr 2022 11:42:49 +0900 From: Michael Paquier To: David Christensen Cc: Bharath Rupireddy , PostgreSQL-development Subject: Re: [PATCH] Teach pg_waldump to extract FPIs from the WAL Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="QPJWeT3OhblTfCIu" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --QPJWeT3OhblTfCIu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 25, 2022 at 10:24:52AM -0500, David Christensen wrote: > On Mon, Apr 25, 2022 at 6:03 AM Bharath Rupireddy > wrote: >> Thanks for working on this. I'm just thinking if we can use these FPIs >> to repair the corrupted pages? I would like to understand more >> detailed usages of the FPIs other than inspecting with pageinspect. >=20 > My main use case was for being able to look at potential corruption, > either in the WAL stream, on heap, or in tools associated with the WAL > stream. I suppose you could use the page images to replace corrupted > on-disk pages (and in fact I think I've heard of a tool or two that > try to do that), though don't know that I consider this the primary > purpose (and having toast tables and the list, as well as clog would > make it potentially hard to just drop-in a page version without > issues). Might help in extreme situations though. You could do a bunch of things with those images, even make things worse if you are not careful enough. >> 10) Along with pg_pwrite(), can we also fsync the files (of course >> users can choose it optionally) so that the writes will be durable for >> the OS crashes? >=20 > Can add; you thinking a separate flag to disable this with default true? We expect data generated by tools like pg_dump, pg_receivewal (depending on the use --synchronous) or pg_basebackup to be consistent when we exit from the call. FWIW, flushing this data does not seem like a strong requirement for something aimed at being used page-level chirurgy or lookups, because the WAL segments should still be around even if the host holding the archives is unplugged. -- Michael --QPJWeT3OhblTfCIu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmJnXCkACgkQnvQgOdby QH0TxBAAhtc1jCQTCRy3vGQD2rOdNixCom+B5s8ssqTKtuO7PcAkc3Qwn4TzjPPd 89TO7lpVmyfzujpQ4xJL5ByO9w2QvPdEr+FiJTkmb3egu+TVCbx/ZHrp7YQUWOgU yEZA7/Hb3olpvPnVCidbhRuU4Ams7s+Go4i+6A/em/EQ3PFF/zNkhGQjoX9QtF2g G+cxKgPKkVcPz0UffSqFmZK/KuUEdRzbXhbo5bOa4WaAlezPwsLJ4yuzt3NqyJ53 ShzD/w/f3Z7uTwJedGZXnZjifcLjDlN7X0W/uPVftzJSRTSv+1l6jTb3JMKVo5EW 30PPbxuRYneBP+rU13TPeB5gYGj3L0kf3vshiPyrSy2fNTP73QtsJYo3WQB5POV5 3HIFlB3fnZS1pVvIX541aduoxlAZ5uqwEnkrQreUDkgwsXbB7kb3ZDeG6Thz4w2i 8i/KYXr4WY1tzDKXrgmGljdAvQ3At2TOzvO5w3/HHOyeVoCRdfLqHnTNH9awC11x e60LHZPaDO9ifSxBEJbwhLTXXH9oiRf2VdkqUCFE/OCGPW3nBzxMjcU+W416VgHA viAmMsJpEJlg8VEhZn3oWZnp/HKc9eX5klU2g5bjd16IL/zmIT9+Fzd3f+C7gK3D Yg/1MuOQFK45+2WW7AoFgOoMGOH8OflYEar2KIR65qyHwL9xYH4= =G9h6 -----END PGP SIGNATURE----- --QPJWeT3OhblTfCIu--