Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 7F7C46506E6 for ; Mon, 14 Jul 2008 14:16:32 -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 02391-02-5 for ; Mon, 14 Jul 2008 14:16:25 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from oxford.xeocode.com (unknown [82.16.16.210]) by postgresql.org (Postfix) with ESMTP id 16E6A650687 for ; Mon, 14 Jul 2008 14:15:47 -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 1KIReI-0003WI-GP; Mon, 14 Jul 2008 18:15:42 +0100 To: "Tom Lane" Cc: "Pavan Deolasee" , "Pgsql Hackers" Subject: Re: [PATCHES] VACUUM Improvements - WIP Patch In-Reply-To: <8741.1216049025@sss.pgh.pa.us> (Tom Lane's message of "Mon\, 14 Jul 2008 11\:23\:45 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Draft-From: ("nnimap+mail01.enterprisedb.com:INBOX.hackers" 24453) References: <2e78013d0806092232h6ca15ffejcbcd24e88401308f@mail.gmail.com> <21751.1215883933@sss.pgh.pa.us> <2e78013d0807132050j16cdc558s4dc3f889371a937d@mail.gmail.com> <8741.1216049025@sss.pgh.pa.us> From: Gregory Stark Organization: EnterpriseDB Date: Mon, 14 Jul 2008 18:15:42 +0100 Message-ID: <87hcasmloh.fsf@oxford.xeocode.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.078 tagged_above=0 required=5 tests=AWL=-0.022, RDNS_NONE=0.1 X-Spam-Level: X-Archive-Number: 200807/670 X-Sequence-Number: 120930 "Tom Lane" writes: >>> It strikes me that what you are trying to do here is compensate for >>> a bad decision in the HOT patch, which was to have VACUUM's first >>> pass prune/defrag a page even when we know we are going to have to >>> come back to that page later. What about trying to fix things so >>> that if the page contains line pointers that need to be removed, >>> the first pass doesn't dirty it at all, but leaves all the work >>> to be done at the second visit? > >> I am not against this idea. Just that it still requires us double scan >> of the main table and that's exactly what we are trying to avoid with >> this patch. > > The part of the argument that I found convincing was trying to reduce > the write traffic (especially WAL log output), not avoiding a second > read. And the fundamental point still remains: the work should be done > in background, not foreground. I like the idea of only having to do a single pass through the table though. Couldn't Pavan's original plan still work and just not have other clients try to remove dead line pointers? At least not unless they're also pruning the page due to an insert or update anyways? Fundamentally it does seem like we want to rotate vacuum's work-load. What we're doing now is kind of backwards. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's 24x7 Postgres support!