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 1nK1L0-0004V4-Lx for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Feb 2022 17:10:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nK1Kz-0006IS-JJ for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Feb 2022 17:10:01 +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 1nK1Kz-0006IJ-A2 for pgsql-hackers@lists.postgresql.org; Tue, 15 Feb 2022 17:10:01 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nK1Kw-0006qt-EF for pgsql-hackers@lists.postgresql.org; Tue, 15 Feb 2022 17:10:00 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 680AC32015ED; Tue, 15 Feb 2022 12:09:54 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 15 Feb 2022 12:09:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; 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=fm3; bh=wcaO3limu1Zlnj7T11GwYVWQgiyOrAOPIRfiDL y8pVY=; b=pUqu6Z6/8DS+bwuM9T7+L/IGL5MagZfeYlbMEDwXZ7nX8ygEmyw1oZ Fl+rt7JW42ISGF/cowiiZCaCvnPCgdRS2v6vuxWznDsm3UX44G8cjziFyXG3EJbj sZbIg2e88sqisrQ0aHuMrE8c2CsD9N1N+Mb9P+/eD8JHdFRzX7bTt0Bx/rRP+IpZ 2uIZTYoJLS/IuvWMVPTTrhYVTEPAGM+27gUPjzztIFek+7HZiBGjIucUY0XWh0oI LBHa3lLfx6/2dIFbEaYX+58v033L9wauJ6JxDhkahvr/qDu1+ayjTCtsTSYDqHOH oO+D/kvCmt1UX5IwCKr1PFr0sMeh+WkA== 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=fm2; bh=wcaO3limu1Zlnj7T1 1GwYVWQgiyOrAOPIRfiDLy8pVY=; b=aB/x2vyixwENVjhN+5HtO5CFM0cIVELtB BaVf8xXifEwICNukXi9Ta2rH8xI2NR/OUPAS6Q8C4HYJAntxJlZPzU0F8QpdKQoZ FJaCIBSApBb1xAR47WjF98RMz5Oz3FgpdQNiKJut0/1yBcrCFNnG7dVNoWmQ3HlG g9fM1it3N2l4PZRMw0BxwkVNtZ2wm3CAbVf0P/BIk0uGjumfYxgc0Ixv0PMcXQvV X5wuFYoBPZBGIYAcJ7OyTxhwvl7byy/n96ctFXRSv3h7plw9xH+v63HfZfSnPbSr 5aALjdo5MwaFVmLsgxTLIkzD65ckBX6QmDu1HdBmOckT9YiHMxYLQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrjeeggdelhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughrvghs ucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrfgrth htvghrnhepudekhfekleeugeevteehleffffejgeelueduleeffeeutdelffeujeffhfeu ffdunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 15 Feb 2022 12:09:53 -0500 (EST) Date: Tue, 15 Feb 2022 09:09:52 -0800 From: Andres Freund To: Bharath Rupireddy Cc: Nathan Bossart , "Bossart, Nathan" , Tom Lane , Julien Rouhaud , PostgreSQL Hackers Subject: Re: Avoid erroring out when unable to remove or parse logical rewrite files to save checkpoint work Message-ID: <20220215170952.2ruszfrv6qvirmhq@alap3.anarazel.de> References: <867F2E29-2782-4869-970E-B984C6D35A8F@amazon.com> <20220121194956.br76car5qzqhji5s@alap3.anarazel.de> <20220127010109.GA352793@nathanxps13> <20220201235538.GA740616@nathanxps13> <20220202183738.GA746893@nathanxps13> <20220204000340.GA1164333@nathanxps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2022-02-10 21:30:45 +0530, Bharath Rupireddy wrote: > From 4801ff2c3b1e7bc7076205b676d4e3bc4a4ed308 Mon Sep 17 00:00:00 2001 > From: Bharath Rupireddy > Date: Thu, 10 Feb 2022 15:58:58 +0000 > Subject: [PATCH v8] Replace ReadDir with ReadDirExtended > > Replace ReadDir with ReadDirExtended (in CheckPointSnapBuild) and > get rid of lstat entirely. I think this might be based on a slight misunderstanding / bad phrasing on my part. We can use get_dirent_type() to optimize away the lstat on most platforms, ReadDirExtended itself doesn't do that automatically. I was trying to reference removing lstat calls by using get_dirent_type() in more places... > We still use ReadDir in CheckPointLogicalRewriteHeap > because unable to read directory would result a NULL from > ReadDirExtended and we may miss to fsync the remaining map files, > so here let's error out with ReadDir. Then why is this skipping the lstat? > Also, convert "could not parse filename" and "could not remove file" > errors to LOG messages in CheckPointLogicalRewriteHeap. This will > enable checkpoint not to waste the amount of work that it had done. I still doubt this is a good idea. Greetings, Andres Freund