X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 979DDD1B4ED for ; Sun, 5 Oct 2003 16:47:09 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 69575-01 for ; Sun, 5 Oct 2003 13:46:24 -0300 (ADT) Received: from wight.ymogen.net (unknown [217.27.240.153]) by svr1.postgresql.org (Postfix) with SMTP id 74BA2D1B4FC for ; Sun, 5 Oct 2003 13:46:22 -0300 (ADT) Received: (qmail 30480 invoked from network); 5 Oct 2003 16:46:22 -0000 Received: from dsl-217-155-239-51.zen.co.uk (HELO finisterre) (217.155.239.51) by wight.ymogen.net with SMTP; 5 Oct 2003 16:46:22 -0000 From: "Matt Clark" To: "Andrew Sullivan" , Subject: Re: reindex/vacuum locking/performance? Date: Sun, 5 Oct 2003 17:46:21 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <20031005143431.GC3441@libertyrms.info> Importance: Normal X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/155 X-Sequence-Number: 3903 > On Sun, Oct 05, 2003 at 12:14:24PM +0100, Matt Clark wrote: > > more info on how it clobbers shared_buffers? > > Vacuum is like a seqscan. It touches everything on a table. So it > doesn't clobber them, but that's the latest data. It's unlikely your > buffers are big enough to hold your database, unless your database is > small. So you'll end up expiring potentially useful data in the > buffer. OK I'm definitely missing something here. I thought that the FSM was there to keep track of potentially free pages, and that all VACUUM did was double check and then write that info out for all to see? The promise being that a VACUUM FULL will walk all pages on disk and do a soft-shoe-shuffle to aggresively recover space, but a simple VACUUM won't (merely confirming pages as available for reuse). As for buffers, my understanding is that they are *not* meant to be big enough to hold the DB, as PG explicitly leaves caching up to the underlying OS. 'buffers' here meaning shared memory between PG processes, and 'cache' meaning OS cache. 'buffers' only need to be big enough to hold the intermediate calcs and the results for any current transactions? M