Re: [PERFORM] encouraging index-only scans

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Geoghegan <peter(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PERFORM] encouraging index-only scans
Date: 2013-09-06 13:08:54
Message-ID: 20130906130854.GB600952@alap2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

On 2013-09-06 01:22:36 -0400, Alvaro Herrera wrote:
> 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.

Agreed.

> 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 am not sure I understand this though. What would be the point to go
and set all visible and not do the rest of the vacuuming work?

I think triggering vacuuming by scanning the visibility map for the
number of unset bits and use that as another trigger is a good idea. The
vm should ensure we're not doing superflous work.

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-09-06 13:12:07 Re: [PERFORM] encouraging index-only scans
Previous Message Serge Fonville 2013-09-06 12:31:45 Re:

Browse pgsql-performance by date

  From Date Subject
Next Message Andres Freund 2013-09-06 13:12:07 Re: [PERFORM] encouraging index-only scans
Previous Message Hannu Krosing 2013-09-06 11:38:56 Re: [PERFORM] encouraging index-only scans