Re: why select count(*) consumes wal logs - Mailing list pgsql-general

From Tom Lane
Subject Re: why select count(*) consumes wal logs
Date
Msg-id 29298.1541529681@sss.pgh.pa.us
Whole thread Raw
In response to Re: why select count(*) consumes wal logs  (Michael Nolan <htfoot@gmail.com>)
List pgsql-general
Michael Nolan <htfoot@gmail.com> writes:
> On Tue, Nov 6, 2018 at 11:40 AM Tom Lane <tgl@sss.pgh.pa.us> 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


pgsql-general by date:

Previous
From: "Ondřej Bouda"
Date:
Subject: Re: backend crash on DELETE, reproducible locally
Next
From: Alvaro Herrera
Date:
Subject: Re: backend crash on DELETE, reproducible locally