pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <kgrittn@ymail.com>
To: Robert Haas <robertmhaas@gmail.com>
To: Andres Freund <andres@2ndquadrant.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: Thu, 19 Sep 2013 14:36:53 -0700 (PDT)
Message-ID: <1379626613.94647.YahooMailNeo@web162901.mail.bf1.yahoo.com> (raw)
In-Reply-To: <CA+TgmoZQyt253OA_ssD6OVs8o0-RkRz3eK6qZz3Utwp-2QVf6A@mail.gmail.com>
References: <20130906052236.GF6067@eldon.alvh.no-ip.org>
	<20130906130854.GB600952@alap2.anarazel.de>
	<20130906163056.GA13158@momjian.us>
	<20130906163647.GA626072@alap2.anarazel.de>
	<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>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Robert Haas <robertmhaas@gmail.com> wrote:

> Right now, whether or not to autovacuum is the rest of a two-pronged

> test.  The first prong is based on number of updates and deletes
> relative to table size; that triggers a regular autovacuum.  The
> second prong is based on age(relfrozenxid) and triggers a
> non-page-skipping vacuum (colloquially, an anti-wraparound vacuum).
> 
> The typical case in which this doesn't work out well is when the table
> has a lot of inserts but few or no updates and deletes.  So I propose
> that we change the first prong to count inserts as well as updates and
> deletes when deciding whether it needs to vacuum the table.  We
> already use that calculation to decide whether to auto-analyze, so it
> wouldn't be very novel.   We know that the work of marking pages
> all-visible will need to be done at some point, and doing it sooner
> will result in doing it in smaller batches, which seems generally
> good.
> 
> However, I do have one concern: it might lead to excessive
> index-vacuuming.  Right now, we skip the index vac step only if there
> ZERO dead tuples are found during the heap scan.  Even one dead tuple
> (or line pointer) will cause an index vac cycle, which may easily be
> excessive.  So I further propose that we introduce a threshold for
> index-vac; so that we only do index vac cycle if the number of dead
> tuples exceeds, say 0.1% of the table size.

+1  I've been thinking of suggesting something along the same lines,
for the same reasons.

 
-- 
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (64+ messages)  latest in thread

Message-ID: <1379626613.94647.YahooMailNeo@web162901.mail.bf1.yahoo.com>
Permalink:  ../1379626613.94647.YahooMailNeo@web162901.mail.bf1.yahoo.com/
Also on:    postgresql.org/message-id/1379626613.94647.YahooMailNeo@web162901.mail.bf1.yahoo.com

 · 

reply

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: kgrittn@ymail.com, robertmhaas@gmail.com, andres@2ndquadrant.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: <1379626613.94647.YahooMailNeo@web162901.mail.bf1.yahoo.com>

* 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