Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gK6I8-0008Rq-Rh for pgsql-general@arkaria.postgresql.org; Tue, 06 Nov 2018 18:41:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gK6I4-0002xL-Vi for pgsql-general@arkaria.postgresql.org; Tue, 06 Nov 2018 18:41:28 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gK6I4-0002xA-NS for pgsql-general@lists.postgresql.org; Tue, 06 Nov 2018 18:41:28 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gK6I2-0005uO-BS for pgsql-general@lists.postgresql.org; Tue, 06 Nov 2018 18:41:28 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id wA6IfLaG029299; Tue, 6 Nov 2018 13:41:21 -0500 From: Tom Lane To: Michael Nolan cc: srkrishna1@aol.com, pgsql-general@lists.postgresql.org Subject: Re: why select count(*) consumes wal logs In-reply-to: References: <653931906.1147337.1541523848244.ref@mail.yahoo.com> <653931906.1147337.1541523848244@mail.yahoo.com> <26567.1541526011@sss.pgh.pa.us> Comments: In-reply-to Michael Nolan message dated "Tue, 06 Nov 2018 12:27:02 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <29297.1541529681.1@sss.pgh.pa.us> Date: Tue, 06 Nov 2018 13:41:21 -0500 Message-ID: <29298.1541529681@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Michael Nolan writes: > On Tue, Nov 6, 2018 at 11:40 AM Tom Lane wrote: >> That represents setting the yes-this-row-is-committed hint bits on the >> newly loaded rows. The first access to any such row will set that bit, >> whether it's a select or a VACUUM or whatever. > Tom, does that include ANALYZE? Yes, but remember that ANALYZE doesn't scan the whole table; it'll only set the bit on rows it visits. (I forget at the moment if it's guaranteed to set the bit on all rows in each page it examines, or only on the rows it selects to sample. But in any case it will not examine every page in the table.) regards, tom lane