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 1nRx94-0001vG-IF for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Mar 2022 14:18:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nRx93-0005Q6-CO for pgsql-hackers@arkaria.postgresql.org; Wed, 09 Mar 2022 14:18:29 +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 1nRx92-0005O8-Sa for pgsql-hackers@lists.postgresql.org; Wed, 09 Mar 2022 14:18:28 +0000 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nRx90-0003Jy-FO for pgsql-hackers@lists.postgresql.org; Wed, 09 Mar 2022 14:18:27 +0000 Received: by mail-pl1-x634.google.com with SMTP id w4so2026885ply.13 for ; Wed, 09 Mar 2022 06:18:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=5ALDKxwFQjcJwJF4hAPFDKttBTVXCJKRxq4Oxk32iMY=; b=qjNOc6FsinVixQQBrdD6NA4Xtc1owJMPYVlQuSKf5jKsC4/4L+ryqJunMF1A1rmoG5 UQGME7WJXy4TrW9/WdxxdhExnoLrog6R/MfGodGRgLeitLYG/6XgTKcNU/xcpHBKUxjc OZWg8aoBq6dT8IVPg5J8kJVt25trGuBz4PF9cUC/+Rb1ui05Rgv1MYQZFeAAGlP3UGZv 3Wfx9KogxYNCQEnUAbFF7LAkatQbsU3U0wQ/MUA+DL0rVgWofDCMard9rHWk5TGOudFz vQXOb3wr4Qxe3sDb8tcNa9ZNk1G7YAHOIPMJh7YN8WoZ/mr2N70vxs0FwU6nnp9qnga1 1QXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=5ALDKxwFQjcJwJF4hAPFDKttBTVXCJKRxq4Oxk32iMY=; b=wqgGQtZV3vdq7p7fHCnqMLJPnzPa2ARgkycsdA6NPEZ80dSHCrKiaOyRqT5SGNmUBe EARVmMWklOxhGPOWVu7+GhGS1ciVrMAhJlmdXr6SgIlF42kdewUwI8B5ju2YFcTOgdEN zM4Mg2VCe3ADz53m1lyAuRQgmWvdJ8xdbpyKBGnkOsJY5ygAGgKlbbC3RSCKg9zmwE2/ XSe6YF2rDWFaWfyPixD/B5Jrieep75JZv1ZIXO8am0mOdgUe44CS2AXLi+GD0KrDBtlv EmgcyV8ZykOjYeGPwBWA4FaU2oVDtZn7zWplYreft/HMN8ElcvNThXUC59DIM5xcf9fd rE5g== X-Gm-Message-State: AOAM530OYoptNJ1uQT3saLfgOwI5eizVRb5mATgrNUIj5Tuqz/b0Ue+G sDfeEfMHju1JV5ti2sf+9lI= X-Google-Smtp-Source: ABdhPJyAvb2VJavPzirVVW3030kCqHuCTWDxOqYrcwmCAV0DeSLBbGXkmiLLWDixmSsAOmzg6GxleQ== X-Received: by 2002:a17:90a:db96:b0:1bf:a7c9:9571 with SMTP id h22-20020a17090adb9600b001bfa7c99571mr4668851pjv.173.1646835504909; Wed, 09 Mar 2022 06:18:24 -0800 (PST) Received: from jrouhaud (1-171-173-93.dynamic-ip.hinet.net. [1.171.173.93]) by smtp.gmail.com with ESMTPSA id d20-20020a056a0010d400b004f7093700c4sm3382642pfu.76.2022.03.09.06.18.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Mar 2022 06:18:24 -0800 (PST) Date: Wed, 9 Mar 2022 22:17:50 +0800 From: Julien Rouhaud To: Nitin Jadhav Cc: Matthias van de Meent , Bharath Rupireddy , Ashutosh Sharma , Bruce Momjian , Tom Lane , Magnus Hagander , PostgreSQL Hackers Subject: Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) Message-ID: <20220309141750.jirvp5o5v5zpr4lz@jrouhaud> References: 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 Tue, Mar 08, 2022 at 08:57:23PM +0530, Nitin Jadhav wrote: > > I just wanted to avoid extra calculations just to show the progress in > the view. Since it's a good metric, I have added an additional field > named 'next_flags' to the view which holds all possible flag values of > the next checkpoint. I still don't think that's ok. IIUC the only way to know if the current checkpoint is throttled or not is to be aware that the "next_flags" can apply to the current checkpoint too, look for it and see if that changes the semantics of what the view say the current checkpoint is. Most users will get it wrong. > This gives more information than just saying > whether the new checkpoint is requested or not with the same memory. So that next_flags will be empty most of the time? It seems confusing. Again I would just display a bool flag saying whether a new checkpoint has been explicitly requested or not, it seems enough. If you're interested in that next checkpoint, you probably want a quick completion of the current checkpoint first (and thus need to know if it's throttled or not). And then you will have to keep monitoring that view for the next checkpoint anyway, and at that point the view will show the relevant information.