Re: EXPLAIN BUFFERS: dirtied

From: Vitaliy Garnashevich <vgarnashevich(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: EXPLAIN BUFFERS: dirtied
Date: 2018-01-29 19:21:00
Message-ID: cf69d9d5-18f1-288b-c70c-186b3cde64dd@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I've read this article: https://wiki.postgresql.org/wiki/Hint_Bits

It says:

> A plain SELECT, count(*), or VACUUM on the entire table will check
> every tuple for visibility and set its hint bits.

Suppose, a new page was created using many INSERTs, and then was written
to disk during a checkpoint. There were no SELECTs or VACUUM on the page
or table yet. Will the following SELECT of one tuple from the page
update hint bits for ALL tuples on the page? Is that correct?

When a page is initially created and then is being written to disk
during a checkpoint, does checkpoint writer update the hint bits before
writing the page, or the following SELECT/VACUUM will have to do that
(possibly loading/updating/writing the page again)?

Regards,
Vitaliy

On 2018-01-29 20:38, Tom Lane wrote:
> Vitaliy Garnashevich <vgarnashevich(at)gmail(dot)com> writes:
>> But what is "dirtied" statistics? When a SELECT query could make pages
>> dirty?
> Setting hint bits on recently-committed rows.
>
> regards, tom lane
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steven Lembark 2018-01-29 19:41:45 Re: Using AWS ephemeral SSD storage for production database workload?
Previous Message support-tiger 2018-01-29 19:18:59 Re: pg 10.1 missing libpq in postgresql-devel