pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Nolan <htfoot@gmail.com>
Cc: srkrishna1@aol.com
Cc: pgsql-general@lists.postgresql.org
Subject: Re: why select count(*) consumes wal logs
Date: Tue, 06 Nov 2018 13:41:21 -0500
Message-ID: <29298.1541529681@sss.pgh.pa.us> (raw)
In-Reply-To: <CAOzAquLTB7KVYod965fPkA3Mn1K5r7=Cp8RTyEiXjAzs2cq6Tg@mail.gmail.com>
References: <653931906.1147337.1541523848244.ref@mail.yahoo.com>
	<653931906.1147337.1541523848244@mail.yahoo.com>
	<26567.1541526011@sss.pgh.pa.us>
	<CAOzAquLTB7KVYod965fPkA3Mn1K5r7=Cp8RTyEiXjAzs2cq6Tg@mail.gmail.com>

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




view thread (15+ messages)  latest in thread

Message-ID: <29298.1541529681@sss.pgh.pa.us>
Permalink:  ../29298.1541529681@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/29298.1541529681@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, htfoot@gmail.com, srkrishna1@aol.com
  Subject: Re: why select count(*) consumes wal logs
  In-Reply-To: <29298.1541529681@sss.pgh.pa.us>
  References: <653931906.1147337.1541523848244.ref@mail.yahoo.com> <653931906.1147337.1541523848244@mail.yahoo.com> <26567.1541526011@sss.pgh.pa.us> <CAOzAquLTB7KVYod965fPkA3Mn1K5r7=Cp8RTyEiXjAzs2cq6Tg@mail.gmail.com> <29298.1541529681@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox