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 A318DD1B50D for ; Fri, 3 Oct 2003 22:12:32 +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 53914-01 for ; Fri, 3 Oct 2003 19:11:49 -0300 (ADT) Received: from bob.samurai.com (bob.samurai.com [205.207.28.75]) by svr1.postgresql.org (Postfix) with ESMTP id 688D6D1B506 for ; Fri, 3 Oct 2003 19:11:46 -0300 (ADT) Received: from 6-allhosts (d226-85-166.home.cgocable.net [24.226.85.166]) by bob.samurai.com (Postfix) with ESMTP id C532C1DF6; Fri, 3 Oct 2003 18:11:47 -0400 (EDT) Subject: Re: reindex/vacuum locking/performance? From: Neil Conway To: Rob Nagler Cc: PostgreSQL Performance In-Reply-To: <16253.61013.56254.526139@jump.bivio.com> References: <16253.56074.737161.470428@jump.bivio.com> <954.1065214676@sss.pgh.pa.us> <16253.61013.56254.526139@jump.bivio.com> Content-Type: text/plain Message-Id: <1065219105.3068.43.camel@tokyo> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Fri, 03 Oct 2003 18:11:45 -0400 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/116 X-Sequence-Number: 3864 On Fri, 2003-10-03 at 17:47, Rob Nagler wrote: > They don't deadlock normally, > only with reindex and vacuum did I see this behavior. If you can provide a reproducible example of a deadlock induced by REINDEX + VACUUM, that would be interesting. (FWIW, I remember noticing a potential deadlock in the REINDEX code and posting to -hackers about it, but I've never seen it occur in a real-world situation...) > One other question: The reindex seems to lock the table for the entire > process as opposed to freeing the lock between index rebuilds. Yeah, I wouldn't be surprised if there is some room for optimizing the locks that are acquired by REINDEX. -Neil