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 1ncBQE-0002iT-9d for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Apr 2022 19:34: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 1ncBQB-00043b-R4 for pgsql-hackers@arkaria.postgresql.org; Wed, 06 Apr 2022 19:34:27 +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 1ncBQB-00043M-D5 for pgsql-hackers@lists.postgresql.org; Wed, 06 Apr 2022 19:34:27 +0000 Received: from mail-il1-x12a.google.com ([2607:f8b0:4864:20::12a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ncBQ6-0006sb-L9 for pgsql-hackers@lists.postgresql.org; Wed, 06 Apr 2022 19:34:26 +0000 Received: by mail-il1-x12a.google.com with SMTP id k15so2721312ils.0 for ; Wed, 06 Apr 2022 12:34:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=eyFrz14PHZlcbR3NewZBsd3LuxRR2FLbrqDlayaa7YQ=; b=aE0RikpXMjOf75JjfCZr+5JWo/evjgzVW3a/NcnvOJ4kn1/SWLYOg7A26ZYjkKUmbX RjWQ3wZt85/O6CU/rQ7NMrN8pNOGZdXhVhNGeOvLSHce1s65i2k3iwc4AnbjJrgZYst5 yHzKUr+pc5/Q+YzTsfRGfMDiZdRDvqKxqLbVP56SWShMKs7EZkYEgav0z/Mrlp/IBjkx pKP+3sOwTGvwTJrPOoZYjmI9PEWvX9Gi+MGxK8LFV9ttngup9v9tcjHaoks2F98OkUB/ iX44WbR5WEpG1j3uy+M0fkh0Qnd2Cj961/ixTI5vawwJ8oO+PEFVZdZeZXV6vrZ3GBXg y6Eg== 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:user-agent; bh=eyFrz14PHZlcbR3NewZBsd3LuxRR2FLbrqDlayaa7YQ=; b=Acb6mPKZvlKcVNWQGDEwfkIEugZ+/Tsbw29NnfmGF6SrzJwvGh07j6zk6UGfnqUtA9 T61LK88qvVPWdzxrqSctJNMvYr90ivj4auMBDdL7nn5lw26zvvK/OtLFFI0xbt3eUR7D moz4dW0PvnKN0Uqf5mDI7OJT0HGHvRaI82n13vLiKkC+GD4FmQ5PJf63fgfwWlAi3Mss GqdJpozudIiVlUoabUBJY0oudvL4XfOnhAktn5OxBPkXh9pLSSN2KKmHKlWSwWzJXPKW Bvo0cEtvUp2VuHx1RTXp4rel3FP9G2hFBHZmeBY58wl5R5p2IS7uGllhzSTWwcf9J9Ib sTGA== X-Gm-Message-State: AOAM530UOnkx0fI5gvAAVlqCpxVoKqFy8VZkCdkLVHCPoygouP7DtFY8 0O59BW5PIsT6ctAIKDgldWt6wQ== X-Google-Smtp-Source: ABdhPJyXngUzeZP/wAiroOuHUzTuaHU9b2NtYOfFByFQYNA+v0xE0oJP4xPP8Ami2n0KPW3j4N6v0w== X-Received: by 2002:a92:6512:0:b0:2ca:1e16:5751 with SMTP id z18-20020a926512000000b002ca1e165751mr5330108ilb.210.1649273661610; Wed, 06 Apr 2022 12:34:21 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id y14-20020a056e020f4e00b002ca4ec1c97asm4679105ilj.53.2022.04.06.12.34.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Apr 2022 12:34:21 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id AEAAA800E68; Wed, 6 Apr 2022 14:34:19 -0500 (CDT) Date: Wed, 6 Apr 2022 14:34:19 -0500 From: Justin Pryzby To: Andres Freund Cc: Lukas Fittl , Kyotaro Horiguchi , melanieplageman@gmail.com, Thomas Munro , "David G. Johnston" , pgsql-hackers@lists.postgresql.org Subject: Re: shared-memory based stats collector - v70 Message-ID: <20220406193419.GA24419@telsasoft.com> References: <20220317073652.kz3uuh6le6vbfod4@alap3.anarazel.de> <20220325.142256.1649716600998659084.horikyota.ntt@gmail.com> <20220325.172418.1055357550509939415.horikyota.ntt@gmail.com> <20220402082102.ojdd2e6cobsmljvh@alap3.anarazel.de> <20220404041516.cctrvpadhuriawlq@alap3.anarazel.de> <20220405030506.lfdhbu5zf4tzdpux@alap3.anarazel.de> <20220406030008.2qxipjxo776dwnqs@alap3.anarazel.de> <20220406192734.7hhspfpepcq2cyum@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220406192734.7hhspfpepcq2cyum@alap3.anarazel.de> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Apr 06, 2022 at 12:27:34PM -0700, Andres Freund wrote: > > > + next use of statistical information will cause a new snapshot to be built > > > + or accessed statistics to be cached. > > > > I believe this should be an "and", not an "or". (next access builds both a > > new snapshot and caches accessed statistics) > > I *think* or is correct? The new snapshot is when stats_fetch_consistency = > snapshot, the cached is when stats_fetch_consistency = cache. Not sure how to > make that clearer without making it a lot longer. Suggestions? I think it's correct. Maybe it's clearer to say: + next use of statistical information will (when in snapshot mode) cause a new snapshot to be built + or (when in cache mode) accessed statistics to be cached.