pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Bruce Momjian <bruce@momjian.us>
Cc: Robert Haas <robertmhaas@gmail.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, 6 Sep 2013 01:22:36 -0400
Message-ID: <20130906052236.GF6067@eldon.alvh.no-ip.org> (raw)
In-Reply-To: <20130906020043.GH27195@momjian.us>
References: <15321.1355347953@sss.pgh.pa.us>
	<50C90154.8060103@dunslane.net>
	<50C904DB.9090305@dunslane.net>
	<20121213024837.GB22363@momjian.us>
	<23298.1355370698@sss.pgh.pa.us>
	<CAEYLb_U1dTg=bXkDL=yvFTrMw5oC13ivgZA=jdQXnbgaDJ+e-Q@mail.gmail.com>
	<20130904205655.GR21874@momjian.us>
	<20130906001437.GA29264@momjian.us>
	<CA+Tgmobh_-n-GvKX++DVctToZ9SZkdhvszP=CBjh9XZOvWsTEg@mail.gmail.com>
	<20130906020043.GH27195@momjian.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Bruce Momjian escribió:

> Ideas
> -----
> 
> I think we need to detect tables that do not have VM bits set and try to
> determine if they should be vacuumed.  If a table has most of its VM
> bits set, there in need to vacuum it for VM bit setting.

I think it's shortsighted to keep thinking of autovacuum as just a way
to run VACUUM and ANALYZE.  We have already discussed work items that
need to be done separately, such as truncating the last few empty pages
on a relation that was vacuumed recently.  We also need to process a GIN
index' pending insertion list; and with minmax indexes I will want to
run summarization of heap page ranges.

So maybe instead of trying to think of VM bit setting as part of vacuum,
we could just keep stats about how many pages we might need to scan
because of possibly needing to set the bit, and then doing that in
autovacuum, independently from actually vacuuming the relation.

I'm not sure if we need to expose all these new maintenance actions as
SQL commands.

-- 
Álvaro Herrera                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



view thread (64+ messages)  latest in thread

Message-ID: <20130906052236.GF6067@eldon.alvh.no-ip.org>
Permalink:  ../20130906052236.GF6067@eldon.alvh.no-ip.org/
Also on:    postgresql.org/message-id/20130906052236.GF6067@eldon.alvh.no-ip.org

 · 

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: alvherre@2ndquadrant.com, bruce@momjian.us, robertmhaas@gmail.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: <20130906052236.GF6067@eldon.alvh.no-ip.org>

* 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