From: Andres Freund <andres@2ndquadrant.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Setting vacuum_freeze_min_age really low
Date: Mon, 13 May 2013 19:43:22 +0200
Message-ID: <20130513174322.GC1066@awork2.anarazel.de> (raw)
In-Reply-To: <CA+TgmobGz+PUrG4KqZ1wt84+Q1RvCbDUi-gL_AbF0VYWPtUFDg@mail.gmail.com>
References: <5150B415.9060907@agliodbs.com>
<CA+TgmoaGT8hE2V=m6G=oB_LfMX1S2xvEE=brgf7W58DSgVWgSQ@mail.gmail.com>
<WM!41efa9246894d9bf23cf32434a08ca088019e273ba110794aabdf7a7dcd5ee174abac60907f6c231c474216042ebeaca!@asav-2.01.com>
<518ED420.4090201@agliodbs.com>
<20130512125027.GA7618@awork2.anarazel.de>
<CA+TgmobGz+PUrG4KqZ1wt84+Q1RvCbDUi-gL_AbF0VYWPtUFDg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>
On 2013-05-13 13:21:54 -0400, Robert Haas wrote:
> On Sun, May 12, 2013 at 8:50 AM, Andres Freund <andres@2ndquadrant.com> wrote:
> > [ a response that I entirely agree with ]
>
> +1 to all that.
> It's maybe worth noting that it's probably fairly uncommon for vacuum
> to read a page and not dirty it, because if the page is all-visible,
> we won't read it.
But only if 50(?)+ pages are marked all-visible in one go, otherwise we
afair won't skip afair. And we don't skip them at all during full table
vacuums.
> And if it's not all-visible, and there's nothing
> else interesting to do with it, we'll probably make it all-visible,
> which will dirty it. It can happen, if for example we vacuum a page
> with no dead tuples while the inserting transaction is still running,
> or committed but not yet all-visible. Of course, in those cases we
> won't be able to freeze, either.
IIRC the actual values below which we freeze are always computed
relative to GetOldestXmin() (and have to, otherwise rows will suddently
appear visible). In many, many environment thats lagging behind quite a
bit. Longrunning user transactions, pg_dump, hot_standby_feedback,
vacuum_defer_cleanup_age...
Also, even if the *whole* page isn't all visible because e.g. there just
was another row inserted we still freeze individual rows.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: andres@2ndquadrant.com, robertmhaas@gmail.com, josh@agliodbs.com
Subject: Re: Setting vacuum_freeze_min_age really low
In-Reply-To: <20130513174322.GC1066@awork2.anarazel.de>
* 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