From: Andres Freund <andres@2ndquadrant.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Jim Nasby <jim@nasby.net>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Peter Geoghegan <peter@2ndquadrant.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [PERFORM] encouraging index-only scans
Date: Fri, 20 Sep 2013 17:51:33 +0200
Message-ID: <20130920155133.GB12763@awork2.anarazel.de> (raw)
In-Reply-To: <CA+Tgmoaf_+kXH6g2syaqaUETJx7=UY47badxv1P16rpPM-oeKw@mail.gmail.com>
References: <20130906170159.GB13158@momjian.us>
<20130906191330.GA13193@momjian.us>
<20130906222623.GC626072@alap2.anarazel.de>
<20130907002908.GA12753@momjian.us>
<20130907053449.GE626072@alap2.anarazel.de>
<5238854F.5040708@nasby.net>
<20130917231050.GD29545@awork2.anarazel.de>
<CA+TgmoZQyt253OA_ssD6OVs8o0-RkRz3eK6qZz3Utwp-2QVf6A@mail.gmail.com>
<20130919225929.GC11116@awork2.anarazel.de>
<CA+Tgmoaf_+kXH6g2syaqaUETJx7=UY47badxv1P16rpPM-oeKw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 2013-09-20 11:30:26 -0400, Robert Haas wrote:
> On Thu, Sep 19, 2013 at 6:59 PM, Andres Freund <andres@2ndquadrant.com> wrote:
> > The reason I suggested keeping track of the xids of unremovable tuples
> > is that the current logic doesn't handle that at all. We just
> > unconditionally set n_dead_tuples to zero after a vacuum even if not a
> > single row could actually be cleaned out. Which has the effect that we
> > will not start a vacuum until enough bloat (or after changing this, new
> > inserts) has collected to start vacuum anew. Which then will do twice
> > the work.
> >
> > Resetting n_dead_tuples to the actual remaining dead tuples wouldn't do
> > much good either - we would just immediately trigger a new vacuum the
> > next time we check, even if the xmin horizon is still the same.
>
> One idea would be to store the xmin we used for the vacuum somewhere.
> Could we make that part of the pgstats infrastructure? Or store it in
> a new pg_class column? Then we could avoid re-triggering until it
> advances. Or, maybe better, we could remember the oldest XID that we
> weren't able to remove due to xmin considerations and re-trigger when
> the horizon passes that point.
I suggested a slightly more complex variant of this upthread:
http://archives.postgresql.org/message-id/20130907053449.GE626072%40alap2.anarazel.de
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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, jim@nasby.net, bruce@momjian.us, alvherre@2ndquadrant.com, peter@2ndquadrant.com, tgl@sss.pgh.pa.us, andrew@dunslane.net, pgsql-hackers@postgresql.org
Subject: Re: [PERFORM] encouraging index-only scans
In-Reply-To: <20130920155133.GB12763@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