Skip site navigation (1) Skip section navigation (2)

pgsql: Don't vacuum all-frozen pages.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Don't vacuum all-frozen pages.
Date: 2016-03-10 21:16:37
Message-ID: E1ae7wj-0001mM-Ib@gemulon.postgresql.org (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-committers
Don't vacuum all-frozen pages.

Commit a892234f830e832110f63fc0a2afce2fb21d1584 gave us enough
infrastructure to avoid vacuuming pages where every tuple on the
page is already frozen.  So, replace the notion of a scan_all or
whole-table vacuum with the less onerous notion of an "aggressive"
vacuum, which will pages that are all-visible, but still skip those
that are all-frozen.

This should greatly reduce the cost of anti-wraparound vacuuming
on large clusters where the majority of data is never touched
between one cycle and the next, because we'll no longer have to
read all of those pages only to find out that we don't need to
do anything with them.

Patch by me, reviewed by Masahiko Sawada.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/fd31cd265138019dcccc9b5fe53043670898bc9f

Modified Files
--------------
doc/src/sgml/config.sgml          |  20 ++--
doc/src/sgml/maintenance.sgml     |  86 +++++++++-------
src/backend/commands/vacuumlazy.c | 209 ++++++++++++++++++++++++--------------
3 files changed, 196 insertions(+), 119 deletions(-)


Responses

pgsql-committers by date

Next:From: Andres FreundDate: 2016-03-10 21:22:26
Subject: Re: pgsql: Don't vacuum all-frozen pages.
Previous:From: Tom LaneDate: 2016-03-10 20:53:27
Subject: pgsql: Refactor pull_var_clause's API to make it less tedious to extend

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group