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 1oU1jw-00062z-Ax for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Sep 2022 08:09:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oU1jv-0007oz-0n for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Sep 2022 08:09:23 +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 1oU1ju-0007oq-NV for pgsql-hackers@lists.postgresql.org; Fri, 02 Sep 2022 08:09:22 +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 1oU1js-0000fZ-O7 for pgsql-hackers@lists.postgresql.org; Fri, 02 Sep 2022 08:09:22 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 97F025C01F4; Fri, 2 Sep 2022 04:09:19 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 02 Sep 2022 04:09:19 -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=1662106159; x=1662192559; bh=6YU9N3o+SE 6ZBPhmmCLazYTvvxZM1ZG/3k/7ihTsX6Q=; b=ytW42IKhYc5RldaJaLyguJbIdK XRVLSAPka8ou4LyVAgRcHu/n0WbWQ6a14BFKCrBDwQdofJRGMoIa+BIloRHT1+jQ F0lRWv1u7JU78qbQi02a2XnU3gQxqxxVFmPeNwjQNTDCAKWO9tVUmjaYWAr10AGa p1owdZ4OBH2EmDA0UyF2GCYLG01jFxSabMyrS1f5Kbtzp7IzAyg3G4HeS9odvjEN UWcNBlk+2UgyB8ikjnB1erYapkwcpAo87VfTEDLPsNLaIZzK/tjN5IxeIIWnXNFl yIybkkvN45HlM+YJo3WEfsbqi/EY7XjeWr+kE6y6whTZkUNb3v6bqm6Phybw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id: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=1662106159; x=1662192559; bh=6YU9N3o+SE6ZBPhmmCLazYTvvxZM 1ZG/3k/7ihTsX6Q=; b=UUvLp9e7VOuR+1lO9enWKrwTa4I83gh9z3XyYnPekB/R WitvWXqLw5gmn/faNbLba1zIu7GhEy+UKFRsuhYe7B3EvOyk1QJFvrxVfFrZCaMQ 0d3riMuB5GQN1c/qXda6O/vLLOGK73N6bGAEv+wMdko7+ZT10udEvfhSiC+T8G2L tHwP0O793PCw+ZBgl572pnU6DBUvijcRzF0Kva4dSbC7EIdAylNKB6QtgxuLSp7g p6m7CUfBu5XmKOwGiULwiZseojQ2+yxkzvnMlMf4j5KkTP0/DmcIqXkeesqMdxNH p3bRPT5YRLiWEPNNWRQ5mV4Oa7OoALEUaF4bE78lKg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdeltddgtddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 2 Sep 2022 04:09:16 -0400 (EDT) Date: Fri, 2 Sep 2022 17:09:14 +0900 From: Michael Paquier To: Nathan Bossart Cc: Bharath Rupireddy , Thomas Munro , Tom Lane , Andres Freund , "Bossart, Nathan" , Julien Rouhaud , PostgreSQL Hackers Subject: Re: Avoid erroring out when unable to remove or parse logical rewrite files to save checkpoint work Message-ID: References: <20220816203233.GA255076@nathanxps13> <20220823180744.GD1207981@nathanxps13> <20220828215243.GA298988@nathanxps13> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+RwM3mWgFVf1V9k7" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --+RwM3mWgFVf1V9k7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Aug 31, 2022 at 04:10:59PM +0900, Michael Paquier wrote: > Yeah, what you have here looks pretty fine to me, so this is IMO > committable. Let's wait a bit to see if there are any objections from > the others, in case. I had a few hours and I've spent them looking at what you had here in details, and there were a few things I have tweaked before applying the patch. First, elevel was set to LOG for three calls of get_dirent_type() in code paths where we want to skip entries. This would have become very noisy, so I've switched two of them to DEBUG1 and the third one to DEBUG2 for consistency with the surroundings. A second thing was RemoveXlogFile(), where we passed down a dirent entry *and* its d_name. With this design, it would be easy to mess up things and pass down a file name that does not match with its dirent entry, so I have finished by replacing "segname" by the dirent structure. A last thing was about the two extra comment blocks in fd.c, and I could not convince myself that these were helpful hints so I have removed both of them. -- Michael --+RwM3mWgFVf1V9k7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmMRuioACgkQnvQgOdby QH3hjA//f6Ayr2woym5yKkTSizZFrPOB4EsGE1h/bJqTxevFO7xd18LDiUgoaYMp oMTsTCuAvlpfcYrAP6Pc72Mbrsjz01iowyjW+H6lyXb1Ho3DeV6gkKq6Qo8xF5fb Z3rce1FGmo8Xm2wiirDHVaJlPVE0AtOc7EA+i2bDTpjJx6djqnJdN0MvKUxacsQN F99nVQGhi0bWghYbr6YuP+gaOwiYB6SIxfKtoHHd48i0lvfW7koFv+/MVfSTl+ni hzpHf0eCjbkvZX5fFPxDxwcUg/YrEBfV+PuYeMUkCgShLM4D7E6re78ifUSpbiCR T2m0RvfJLZHrzxy7Qgid4LHroVcVzT7bBDWCUDd6rO4QgsEOiH+evDRu0mcj4es2 unUgqKu+BU7pbv/ROraOiquf2aZY7F7xxLbBnw9IfwMvKbDS3u4mGWE1J1HFzPzf uo20Asa9AOsc4ohd1fyNpb19Wb04jbQxNsivj9Zcdi4uk+C0D+yFWPNYCv/3F9e7 mfA2ftwhq/k92H00xI4lHwQ+NpXhmA9m4ppmRjeXJqBTsJXszhnjBigMQ0E874pI X2OwsCoEjUbm44fpioqVNrCGByxPsQ3iVpbu6GHhKyiXeOA6rns4GAN4WZAJDly5 Q17jx9ZNOUi/+9Mk64X9pibohdLk/SqPuf5TguxV9fvXFGwiaHo= =mgqw -----END PGP SIGNATURE----- --+RwM3mWgFVf1V9k7--