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 23313D1B52D for ; Sun, 5 Oct 2003 23:33:36 +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 34204-06 for ; Sun, 5 Oct 2003 20:32:52 -0300 (ADT) Received: from bob.samurai.com (bob.samurai.com [205.207.28.75]) by svr1.postgresql.org (Postfix) with ESMTP id 46AB2D1B515 for ; Sun, 5 Oct 2003 20:32:49 -0300 (ADT) Received: from 6-allhosts (d226-85-166.home.cgocable.net [24.226.85.166]) by bob.samurai.com (Postfix) with ESMTP id F2EE61EF1; Sun, 5 Oct 2003 19:32:51 -0400 (EDT) Subject: Re: reindex/vacuum locking/performance? From: Neil Conway To: Andrew Sullivan Cc: PostgreSQL Performance In-Reply-To: <20031004152241.GL580@libertyrms.info> References: <60d6de9fah.fsf@dev6.int.libertyrms.info> <20031004152241.GL580@libertyrms.info> Content-Type: text/plain Message-Id: <1065396767.466.12.camel@tokyo> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Sun, 05 Oct 2003 19:32:47 -0400 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/163 X-Sequence-Number: 3911 On Sat, 2003-10-04 at 11:22, Andrew Sullivan wrote: > Also, a vacuum pretty much destroys your shared buffers, so you have > to be aware of that trade-off too. True, although there is no reason that this necessary needs to be the case (at least, as far as the PostgreSQL shared buffer goes). As has been pointed out numerous times on -hackers and in the literature, using LRU for a DBMS shared buffer cache is far from optimal, and better algorithms have been proposed (e.g. LRU-K, ARC). We could even have the VACUUM command inform the bufmgr that the pages it is in the process of reading in are part of a seqscan, and so are unlikely to be needed in the immediate future. -Neil