Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id EDF3BB5D90E for ; Sun, 29 May 2011 11:40:39 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 79314-09 for ; Sun, 29 May 2011 14:40:33 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id CE337B5D8BD for ; Sun, 29 May 2011 11:40:32 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p4TEeRt0019877; Sun, 29 May 2011 10:40:27 -0400 (EDT) To: =?ISO-8859-1?Q?C=E9dric_Villemain?= cc: Greg Stark , Robert Haas , Kevin Grittner , Florian Helmberger , Alvaro Herrera , pgsql-hackers@postgresql.org Subject: Re: [ADMIN] pg_class reltuples/relpages not updated by autovacuum/vacuum In-reply-to: References: <4DD28F73.6010108@25th-floor.com> <25017.1306291669@sss.pgh.pa.us> <4DDCA801.70805@25th-floor.com> <19738.1306338472@sss.pgh.pa.us> <22497.1306341699@sss.pgh.pa.us> <15043.1306423500@sss.pgh.pa.us> <25097.1306426982@sss.pgh.pa.us> <4DDE475B020000250003DD63@gw.wicourts.gov> <4DDE5033020000250003DD71@gw.wicourts.gov> <4DDE7EB8020000250003DDA8@gw.wicourts.gov> <9007.1306446600@sss.pgh.pa.us> <28116.1306609295@sss.pgh.pa.us> <11295.1306645848@sss.pgh.pa.us> Comments: In-reply-to =?ISO-8859-1?Q?C=E9dric_Villemain?= message dated "Sun, 29 May 2011 10:40:28 +0200" Date: Sun, 29 May 2011 10:40:27 -0400 Message-ID: <19876.1306680027@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201105/1493 X-Sequence-Number: 188527 =?ISO-8859-1?Q?C=E9dric_Villemain?= writes: > 2011/5/29 Tom Lane : >> OK, do you like the attached version of that logic?  (Other fragments >> of the patch as before.) > The idea was that remove only one page from the VACUUM will prevent > relfrozenxid update and reltuples (and relpages) update. > Now, I beleive that once we've skip at least one page thanks to > SKIP_PAGES_THRESHOLD, then we should be more agressive and remove as > many as possible pages from the VACUUM, tks to the VM. That would require proof, not just suggestion. Skipping pages will defeat the OS read-ahead algorithm, and so could easily cost more than reading them. regards, tom lane