Re: VACUUM (DISABLE_PAGE_SKIPPING on)

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: VACUUM (DISABLE_PAGE_SKIPPING on)
Date: 2020-11-20 15:38:55
Message-ID: CA+TgmoYyBJxgXG+fddWZJhofU9+XFYOT_kht9n+xY3HU6ykwrw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 20, 2020 at 9:08 AM Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> There are two costs associated with this processing. One is dirtying
> the page (which means it needs to be written down when evicted), and the
> other is to write WAL records for each change. The cost for the latter
> is going to be the same in both cases (with this change and without)
> because the same WAL will have to be written -- the only difference is
> *when* do you pay it. The cost of the former is quite different; with
> Simon's patch we dirty the page once, and without the patch we may dirty
> it several times before it becomes "stable" and no more writes are done
> to it.
>
> (If you have tables whose pages change all the time, there would be no
> difference with or without the patch.)
>
> Dirtying the page less times means less full-page images to WAL, too,
> which can be significant.

Yeah, I think dirtying the page fewer times is a big win. However, a
page may have tuples that are not yet all-visible, and we can't freeze
those just because we are freezing others.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2020-11-20 15:45:59 Re: Prevent printing "next step instructions" in initdb and pg_upgrade
Previous Message Alvaro Herrera 2020-11-20 15:33:40 Re: VACUUM (DISABLE_PAGE_SKIPPING on)