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 1nSlVo-0002QO-TR for pgsql-hackers@arkaria.postgresql.org; Fri, 11 Mar 2022 20:05:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nSlVm-0002gp-Jc for pgsql-hackers@arkaria.postgresql.org; Fri, 11 Mar 2022 20:05:18 +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 1nSlVm-0002gg-8j for pgsql-hackers@lists.postgresql.org; Fri, 11 Mar 2022 20:05:18 +0000 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nSlVj-0000bF-Kr for pgsql-hackers@lists.postgresql.org; Fri, 11 Mar 2022 20:05:17 +0000 Received: by mail-pj1-x1036.google.com with SMTP id rm8-20020a17090b3ec800b001c55791fdb1so1328313pjb.1 for ; Fri, 11 Mar 2022 12:05:15 -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=oaxeeubkVK/AG0mnPDjcoxB7JwM9bxx2Ln07T/Ckhk4=; b=P8QvUSl56U+xOI/KEXOeCz6pUFquAk2jzTu/YeAc+rCIAxeob4/5mOY20Y5uMLI/Bs c5IVI7VTKhi5DhenjHPk5ZAGQqMjakbWkZCBB9cBkKYHv97BYenkh16ZjmTJqaxn88sI LpgX3A1IyCK+AnjPujfOxXSjt57jjyP84CCL+BAmzrWdUl3177zmxTwJkBtm3XjIcome FOx9y+CqvOJP4r2LhIhJScvPzCrFO8AaPD2iNbPvzPrvo4zHFS810yqGbTVvDe/h/gUv xLqxgznGkTmAfeZynqFEEWnnikOGiiGzy8v/5Cff9FLw/NYvjFUD5HF+aFAdr52MuPgj Q36Q== 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=oaxeeubkVK/AG0mnPDjcoxB7JwM9bxx2Ln07T/Ckhk4=; b=h7o9uiq22Lzi4SR8q472yWJJrdiOfJe6wuMcnkN6CE6VwjO15El59lcPapBLCitcCS rG5/2snV6Fp1+eN6xbrL7QopiJhaUqGcCntTolZkIsohEyFATji+A8F8mnGUu/vlucef dcdMuXrn/8i2E5VJ2mulleHjBz+9nJ7p1g9WqyCIaLaE+fVz05DmOZesDqEDeCW7e+gJ Mn+z4BI6nYlfKfiL0y+lR5ntkfleUzWFfUT2e1AgolhI7qB42Uj1+Y4MLkxcIuCChNVE pyqOHeZIz/qQK17Z+CSdHytoTjNQMX/FOxstPi89pGw8nFvJMIW2DHk5rwJeU7YuRNg6 h74Q== X-Gm-Message-State: AOAM532ethakPID9j1bTdHHtq5U/hY8SbrHMLwZFqDKxyNqDqbZBKsKw LbkaTRRzi9t+zcsaDnzxRg4= X-Google-Smtp-Source: ABdhPJxUaWeNdEEB3DizlvL4GEEmd3A28rRBQUHvCTcjDk4T96dpJMaDDdKHZPIr45xUIBDcHfS4og== X-Received: by 2002:a17:90a:380f:b0:1bd:4aa6:651 with SMTP id w15-20020a17090a380f00b001bd4aa60651mr12488263pjb.83.1647029113805; Fri, 11 Mar 2022 12:05:13 -0800 (PST) Received: from nathanxps13 ([50.54.155.70]) by smtp.gmail.com with ESMTPSA id mt15-20020a17090b230f00b001bf191e6f08sm10137036pjb.9.2022.03.11.12.05.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Mar 2022 12:05:13 -0800 (PST) Date: Fri, 11 Mar 2022 12:05:11 -0800 From: Nathan Bossart To: Bharath Rupireddy Cc: Cary Huang , PostgreSQL Hackers Subject: Re: add checkpoint stats of snapshot and mapping files of pg_logical dir Message-ID: <20220311200511.GA682814@nathanxps13> References: <163823361875.8893.16011115215407536326.pgcf@coridan.postgresql.org> 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 + CheckpointStats.repl_map_cutoff_lsn = cutoff; Could we set repl_map_cutoff_lsn closer to where it is calculated? Right now, it's set at the bottom of the function just before the directory is freed. Is there a strong reason to do it there? + "logical rewrite mapping file(s) removed/synced=" UINT64_FORMAT ", size=%zu bytes, time=%ld.%03d s, cutoff LSN=%X/%X", Can we split out the "removed" versus "synced" files? Otherwise, I think this is basically just telling us how many files are in the mappings directory. + CheckpointStats.repl_snap_cutoff_lsn = cutoff; I have the same note for this one as I have for repl_map_cutoff_lsn. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com