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 1nDLA0-0002Ra-6Z for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Jan 2022 06:55:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nDL9z-0007IK-4H for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Jan 2022 06:55:03 +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 1nDL9y-0007IB-Rg for pgsql-hackers@lists.postgresql.org; Fri, 28 Jan 2022 06:55:02 +0000 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nDL9v-0003X3-QQ for pgsql-hackers@lists.postgresql.org; Fri, 28 Jan 2022 06:55:01 +0000 Received: by mail-pf1-x42c.google.com with SMTP id e28so5321114pfj.5 for ; Thu, 27 Jan 2022 22:54:59 -0800 (PST) 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=9MgH4wg+3zKjN2LcC+vxl98gEPouII8sbYTwHskKBA0=; b=klxYP+83K7JtM2O0dMcN1m+FF1kBvOCws77TS7x3D71Hyp2fCcKfAVrxRdYXZHTDOQ ENKX5tEjtim7GqtXP/hOEWslNWwKG1KHM3wrG2mCM9Owt5SIngQ43I2QeoxcNaHYR9wU rsnWXcru2gYPgkw5FqIHdQlyrIUJTzO4bTuGv6/ijR4clT0yo2EEDscoTeh48ntV5Yel 9K73ghLmsz2pA2VlIee9YyGjGWjfX1wvQVAHLdlypbHow1E4mI7tFCAXJTzfXHjLXvTf jRmf72oddcp9WM5/Af8i2xuDt5+A5NbGeNQz0kp2/sBIPFHQ+orcU47GiPnkSi+Fu1we PQ7w== 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=9MgH4wg+3zKjN2LcC+vxl98gEPouII8sbYTwHskKBA0=; b=kY+dxexd3Ywt8hlazdE4VjnN4cFyClgptx1E51pM0sREER6ddrFMH1NA5v7wJU1wgs rprl/VHC50JaxxRqhPg4aYvfrH5JfpnuCPFiXjD/s31KmjIG6Xr+WjAP8ICNmJZSrsw3 LdUHNb7ikce/FPAjr9XXHi6sEjNogoQp5QwmnK8gtx9wSf5j/z0RuxATlxdp/ABG8KC4 HU3oINfPmYdpRXI8YqW3Gp23g8yCSASIh7aO4Pp2rHrn2+HRwWp2oUCZDX9QPez6IOYc txDmm5LZwB9836pKU26jZPvoyeeONu+3rynZbdgQKIFwJF1ipbDGvpDS7jRdTWV+MI5Q SJYQ== X-Gm-Message-State: AOAM531L1/e/JKWaUFnZTEoBJE83Th3aK8EUz6vQw8hEFsToedx12ZHw aacPfIIJBSiWdusmu8n9bV0oMs8mGG5xmnvDEEU= X-Google-Smtp-Source: ABdhPJzJZQ9CgbAM5PlT7wUX+7ZXSu7ieuvf56iRmEbGV++RwEVqnXXsp1dKx0nHOOYbrPdbtXTz7t0CFcrMAkJzCBA= X-Received: by 2002:a62:e704:: with SMTP id s4mr6411770pfh.25.1643352898871; Thu, 27 Jan 2022 22:54:58 -0800 (PST) MIME-Version: 1.0 References: <2031846.1640792459@sss.pgh.pa.us> In-Reply-To: From: Bharath Rupireddy Date: Fri, 28 Jan 2022 12:24:48 +0530 Message-ID: Subject: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs) To: Nitin Jadhav Cc: Bruce Momjian , Tom Lane , Magnus Hagander , 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, Jan 21, 2022 at 11:07 AM Nitin Jadhav wrote: > > > I think the right choice to solve the *general* problem is the > > mentioned pg_stat_progress_checkpoints. > > > > We may want to *additionally* have the ability to log the progress > > specifically for the special cases when we're not able to use that > > view. And in those case, we can perhaps just use the existing > > log_startup_progress_interval parameter for this as well -- at least > > for the startup checkpoint. > > +1 > > > We need at least a trace of the number of buffers to sync (num_to_scan) before the checkpoint start, instead of just emitting the stats at the end. > > > > Bharat, it would be good to show the buffers synced counter and the total buffers to sync, checkpointer pid, substep it is running, whether it is on target for completion, checkpoint_Reason > > (manual/times/forced). BufferSync has several variables tracking the sync progress locally, and we may need some refactoring here. > > I agree to provide above mentioned information as part of showing the > progress of current checkpoint operation. I am currently looking into > the code to know if any other information can be added. As suggested in the other thread by Julien, I'm changing the subject of this thread to reflect the discussion. Regards, Bharath Rupireddy.