Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VHvmb-0003zV-Dq for pgsql-hackers@arkaria.postgresql.org; Fri, 06 Sep 2013 13:09:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VHvma-0004nE-Sa for pgsql-hackers@arkaria.postgresql.org; Fri, 06 Sep 2013 13:09:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VHvmZ-0004lr-GO for pgsql-hackers@postgresql.org; Fri, 06 Sep 2013 13:09:03 +0000 Received: from mail.anarazel.de ([217.115.131.40]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VHvmS-0003yo-Qg for pgsql-hackers@postgresql.org; Fri, 06 Sep 2013 13:09:03 +0000 Received: from intern.anarazel.de (p549F09F1.dip0.t-ipconnect.de [84.159.9.241]) (Authenticated sender: andres@anarazel.de) by mail.anarazel.de (Postfix) with ESMTPSA id 0FEC84E8002; Fri, 6 Sep 2013 15:08:55 +0200 (CEST) Date: Fri, 6 Sep 2013 15:08:54 +0200 From: Andres Freund To: Alvaro Herrera Cc: Bruce Momjian , Robert Haas , Peter Geoghegan , Tom Lane , Andrew Dunstan , PostgreSQL-development Subject: Re: [PERFORM] encouraging index-only scans Message-ID: <20130906130854.GB600952@alap2.anarazel.de> References: <50C90154.8060103@dunslane.net> <50C904DB.9090305@dunslane.net> <20121213024837.GB22363@momjian.us> <23298.1355370698@sss.pgh.pa.us> <20130904205655.GR21874@momjian.us> <20130906001437.GA29264@momjian.us> <20130906020043.GH27195@momjian.us> <20130906052236.GF6067@eldon.alvh.no-ip.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130906052236.GF6067@eldon.alvh.no-ip.org> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org 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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers