Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 5C3A365068E for ; Mon, 14 Jul 2008 15:24:25 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 73291-01 for ; Mon, 14 Jul 2008 15:24:19 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from oxford.xeocode.com (87-127-95-198.no-dns-yet.enta.net [87.127.95.198]) by postgresql.org (Postfix) with ESMTP id 0FA3E65068D for ; Mon, 14 Jul 2008 15:24:18 -0300 (ADT) Received: from localhost ([127.0.0.1] helo=oxford.xeocode.com) by oxford.xeocode.com with esmtp (Exim 4.69) (envelope-from ) id 1KISic-0001UL-JH; Mon, 14 Jul 2008 19:24:14 +0100 To: "Tom Lane" Cc: "Pavan Deolasee" , "Pgsql Hackers" Subject: Re: [PATCHES] VACUUM Improvements - WIP Patch In-Reply-To: <28739.1216058100@sss.pgh.pa.us> (Tom Lane's message of "Mon\, 14 Jul 2008 13\:55\:00 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Draft-From: ("nnimap+mail01.enterprisedb.com:INBOX" 92672) References: <2e78013d0806092232h6ca15ffejcbcd24e88401308f@mail.gmail.com> <21751.1215883933@sss.pgh.pa.us> <2e78013d0807132050j16cdc558s4dc3f889371a937d@mail.gmail.com> <8741.1216049025@sss.pgh.pa.us> <87hcasmloh.fsf@oxford.xeocode.com> <28739.1216058100@sss.pgh.pa.us> From: Gregory Stark Organization: EnterpriseDB Date: Mon, 14 Jul 2008 19:24:14 +0100 Message-ID: <87bq10nx2p.fsf@oxford.xeocode.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200807/685 X-Sequence-Number: 120945 "Tom Lane" writes: > Gregory Stark writes: >> I like the idea of only having to do a single pass through the table though. > > Well, that argument was already overstated: we're not re-reading all of > the table now. Just the pages containing dead line pointers. > >> Couldn't Pavan's original plan still work and just not have other clients try >> to remove dead line pointers? > > You could simply delay recycling of the really-truly-dead line pointers > until the next VACUUM, I suppose. It's not clear how bad a > line-pointer-bloat problem that might leave you with. (It would still > require tracking whether the last vacuum had completed successfully. > I note that any simple approach to that would foreclose ever doing > partial-table vacuums, which is something I thought was on the table > as soon as we had dead space mapping ability.) Well there were three suggestions on how to track whether the last vacuum committed or not. Keeping the last vacuum id in pg_class, keeping it per-page, and keeping it per line pointer. ISTM either of the latter two would work with partial table vacuums. Per line-pointer xids seemed excessively complicated to me but per-page vacuum ids doesn't seem problematic. I would definitely agree that partial-table vacuums are an essential part of the future. >> At least not unless they're also pruning the >> page due to an insert or update anyways? > > Please stop pretending that this overhead will only be paid by > insert/update. The current design for pruning does not work that way, > and we do not have a better design available. Well I'm not pretending. I guess there's something I'm missing here. I thought we only pruned when we wanted to insert a new tuple and found not enough space. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL training!