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 1oDOqg-0003SC-9r for pgsql-hackers@arkaria.postgresql.org; Mon, 18 Jul 2022 11:23:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oDOqd-0002NW-Vv for pgsql-hackers@arkaria.postgresql.org; Mon, 18 Jul 2022 11:23:35 +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 1oDOqd-0002NN-N5 for pgsql-hackers@lists.postgresql.org; Mon, 18 Jul 2022 11:23:35 +0000 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oDOqZ-0002rJ-EI for pgsql-hackers@lists.postgresql.org; Mon, 18 Jul 2022 11:23:35 +0000 Received: by mail-lf1-x132.google.com with SMTP id r9so18722904lfp.10 for ; Mon, 18 Jul 2022 04:23:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mYy4Y4/naUk4yxHu8cfO/Z2lXGaew24PgewSfYsYG94=; b=YRs1oz1StsVedoD3pzDC5LckPTyRMV11Fj9+n/G97aYklR6Z1RuQ7NQIeR0mTOxPLw smfgfgHY7FcDs5UJ2Jl1cp+oMl5CWQp5nk2Rvt23IvjZ2eXkv9g+Gc3R3zDCQyucIn6T pl9NEEWW6IgkhPLXzn7IUDH1UjO27pmT6iZpGXn9ZUjgyFTbHNh3sNh3HKsUn83a4oU2 +cZXlGxPmFLs3aUS7uNhMoioTHoIkh/4SQpi7r1ncyb45ekml7JIIa2DItCf2OtYhjP8 RQGOxyI9gduoRXiTobk+GlxpVNyMmpy6XoKBDGdYKdF49iUwilK/AJcWFypuAmsFjHAc h3Ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mYy4Y4/naUk4yxHu8cfO/Z2lXGaew24PgewSfYsYG94=; b=qnMZU13DoQQJYUkpz65PhibvrWu6jGZmNVexPal0CuSaFMTjxGGhnz1N9Vo0EdSlxL sb6kqGlWhCWGA+sFeUgFLKe06wBsGb5vFXNhRCK9mUcYrPnB105M+/TcdibGcg5kOaK9 Z6chpr5B1TqW71357EZYgxpedyzSdfz4J3/YjcmnFr7mXWm9gTVNXHymXVbqE8LLZABq pMdcIkf1ujRkrmUmqM2CzctO4nI7iwd3F5Y/JZp3lfAZzbtxp98rQR+P2ygdF++6FwQU K+Lo0mHq78h62RG9OZp0enjR+5zY4ElJCOWHyMeIpOxJN2WJx4pyhetSjp30KAOZjxfz HZ0A== X-Gm-Message-State: AJIora+uTdfWq19GPA2+2clKFMRyoVvaxKcF5GJHSd0e0bW4DGz7syzi YepOKfZxCbg+nWjCqpxZtjxUZngFdGUR8Ghtq4K3CS2Wbb0= X-Google-Smtp-Source: AGRyM1u754aLvCnBaSZz8wc2LzR8n+4bOZxRS6kWVpVKS0bYxtO/OY92xGGRm6DEApZeIkfsHB4okse8ol3deGF9mTA= X-Received: by 2002:a05:6512:ea8:b0:48a:1ec9:8396 with SMTP id bi40-20020a0565120ea800b0048a1ec98396mr8992197lfb.445.1658143410414; Mon, 18 Jul 2022 04:23:30 -0700 (PDT) MIME-Version: 1.0 References: <20220215170952.2ruszfrv6qvirmhq@alap3.anarazel.de> <20220215175752.GA2413813@nathanxps13> <20220215181034.nyhd6fwzyg3vgxls@alap3.anarazel.de> <20220215183758.GA2435469@nathanxps13> <20220215231123.GA2584239@nathanxps13> <20220329224832.GA560657@nathanxps13> <20220330162008.GA784267@nathanxps13> <20220408201857.GA1586536@nathanxps13> <20220708171439.GB2356733@nathanxps13> In-Reply-To: <20220708171439.GB2356733@nathanxps13> From: Bharath Rupireddy Date: Mon, 18 Jul 2022 16:53:18 +0530 Message-ID: Subject: Re: Avoid erroring out when unable to remove or parse logical rewrite files to save checkpoint work To: Nathan Bossart Cc: Thomas Munro , Andres Freund , "Bossart, Nathan" , Tom Lane , Julien Rouhaud , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Jul 8, 2022 at 10:44 PM Nathan Bossart wrote: > > > 0002 - I'm not quite happy with this patch, with the change, > > checkpoint errors out, if it can't remove just a file - the comments > > there says it all. Is there any strong reason for this change? > > Andres noted several concerns upthread. In short, ignoring unexpected > errors makes them harder to debug and likely masks bugs. > > FWIW I agree that it is unfortunate that a relatively non-critical error > here leads to checkpoint failures, which can cause much worse problems down > the road. I think this is one of the reasons for moving tasks like this > out of the checkpointer, as I'm trying to do with the proposed custodian > process [0]. > > [0] https://commitfest.postgresql.org/38/3448/ IMHO, we can keep it as-is and if required can be changed as part of the patch set [0], as this change without [0] can cause a checkpoint to fail. Furthermore, I would like it if we convert "could not parse filename" and "could not remove file" ERRORs of CheckPointLogicalRewriteHeap to LOGs until [0] gets in - others may have different opinions though. Just wondering - do we ever have a problem if we can't remove the snapshot or mapping file? May be unrelated, RemoveTempXlogFiles doesn't even bother to check if the temp wal file is removed. Regards, Bharath Rupireddy.