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 1pLHU5-0005vf-Io for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Jan 2023 05:41:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pLHU3-0002cS-83 for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Jan 2023 05:41:07 +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 1pLHU2-0002cI-Tm for pgsql-hackers@lists.postgresql.org; Fri, 27 Jan 2023 05:41:06 +0000 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pLHTx-0002Cd-VG for pgsql-hackers@postgresql.org; Fri, 27 Jan 2023 05:41:05 +0000 Received: by mail-pl1-x636.google.com with SMTP id jl3so3955507plb.8 for ; Thu, 26 Jan 2023 21:41:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=xHd1ivY+QO1Fp9+Na2PvyRpiLb8PEmRXj9FTKtnphdw=; b=d0TR409mNGXXV7XX71ldAjkWGvELh2wZiGd+g8C6M29s7IrJdiXLfGkhQw1t/jVbg7 RDThlTFByPoj3xfb2dad9EknhkEC/7YVYsq9nJp1ya1S03l3WRpM38PapNNg0nq8MxoJ J5FGBJK5gnrA7zgUjOCh4W1v/jpOkG3kGq2YHyoqYXCZgvBsSPmwfEBfI4h8/KSOmWBJ vdYL+JTAnZTPk/7NtNxA+0VBKjOcd22vKNNj9tzrypQs8WaX7MDk1eXpBaVOQ/nq9hkQ 6TWiiEIPACfZnd1kFIc4RnrYG7HCiNqsyEJojPX+/N7TGWJWJUUYc7fDUnsgu/5G5vjH +3Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=xHd1ivY+QO1Fp9+Na2PvyRpiLb8PEmRXj9FTKtnphdw=; b=chvpIJk6GjVu9V5KCuAYGv8HDBC0xOG4kLhKt3NBEy7Eo62T5F9RGJOe0AxFwnAN+c IL8iSG38/QEU+toOqpgNuWo9IMFsSGMnS3UCbUWeJVVeooKYv5/ZzG6QQG85658VgzJJ Awueabjn7Jl8o0QuaTrzKniWk1t/vT181gMsdTZeJcS6icGNnPmLV6ouc0ADAiv6m+Tm Lu4Kpz8NGclD15d2RGP/Yp2XVqcF1S/v1rRdPn8+/gTjP+XW+ajx7J6TneXOduqaB3ap 2RiEyO5c6jPRk3prqLDbCnr80c+KMFO4Fw8vSuVaJTtJpLZrSSk4pjw7LPtou7ntxKQk In9w== X-Gm-Message-State: AFqh2kp37tK+sN+b40gUOCVHchSjLOjE7tYfY5DLUR7yTARlnAeKwoV4 dxI4GMJE12NUlD5ShyUoaD4= X-Google-Smtp-Source: AMrXdXv5A+L7jB3ow3t5Vj6iJGd0XZ1T9evgiJwtmkCOs4NJ0lfuZ77sTgZ/whxhycjXroKXiYXphA== X-Received: by 2002:a17:90a:3f8b:b0:229:32be:5027 with SMTP id m11-20020a17090a3f8b00b0022932be5027mr40626178pjc.18.1674798060885; Thu, 26 Jan 2023 21:41:00 -0800 (PST) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id d14-20020a17090a498e00b00229ff1fd7e0sm4238738pjh.14.2023.01.26.21.40.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Jan 2023 21:41:00 -0800 (PST) Date: Thu, 26 Jan 2023 21:40:58 -0800 From: Nathan Bossart To: Michael Paquier Cc: Andres Freund , pgsql-hackers@postgresql.org Subject: Re: recovery modules Message-ID: <20230127054058.GA2041427@nathanxps13> References: <20230112181721.GA2103226@nathanxps13> <20230116224040.GB2714038@nathanxps13> <20230117182356.GA3015764@nathanxps13> <20230118044427.GA3369836@nathanxps13> <20230123214428.GA572995@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 On Wed, Jan 25, 2023 at 04:34:21PM +0900, Michael Paquier wrote: > The loop part is annoying.. I've never been a fan of adding this > cross-value checks for the archiver modules in the first place, and it > would make things much simpler in the checkpointer if we need to think > about that as we want these values to be reloadable. Perhaps this > could just be an exception where we just give priority on one over the > other archive_cleanup_command? The startup process has a well-defined > sequence after a failure, while the checkpointer is designed to remain > robust. Yeah, there are some problems here. If we ERROR, we'll just bounce back to the sigsetjmp() block once a second, and we'll never pick up configuration reloads, shutdown signals, etc. If we FATAL, we'll just rapidly restart over and over. Given the dicussion about misconfigured archiving parameters [0], I doubt folks will be okay with giving priority to one or the other. I'm currently thinking that the checkpointer should set a flag and clear the recovery callbacks when a misconfiguration is detected. Anytime the checkpointer tries to use the archive-cleanup callback, a WARNING would be emitted. This is similar to an approach I proposed for archiving misconfigurations (that we didn't proceed with) [1]. Given the aformentioned problems, this approach might be more suitable for the checkpointer than it is for the archiver. Thoughts? [0] https://postgr.es/m/9ee5d180-2c32-a1ca-d3d7-63a723f68d9a%40enterprisedb.com [1] https://postgr.es/m/20220914222736.GA3042279%40nathanxps13 -- Nathan Bossart Amazon Web Services: https://aws.amazon.com