Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id D11269FB4E4 for ; Mon, 22 Jan 2007 05:24:14 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 33921-10 for ; Mon, 22 Jan 2007 05:24:13 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail3.ecircle.de (mail3.ecircle.de [195.140.186.206]) by postgresql.org (Postfix) with ESMTP id BAC449FB4E3 for ; Mon, 22 Jan 2007 05:24:11 -0400 (AST) Received: from einstein.muc.ecircle.de (einstein.muc.ecircle.de [192.168.1.7]) by mail3.ecircle.de (READY) with ESMTP id 4DF7911C28A; Mon, 22 Jan 2007 10:24:10 +0100 (CET) Received: from [192.168.1.91] ([192.168.1.91]) by einstein.muc.ecircle.de with Microsoft SMTPSVC(6.0.3790.1830); Mon, 22 Jan 2007 10:24:10 +0100 Subject: Re: Index bloat of 4x From: Csaba Nagy To: Jeremy Haile Cc: Tom Lane , "Ed L." , Postgres general mailing list , Bill Moran , Alvaro Herrera In-Reply-To: <1169233408.21922.1170154897@webmail.messagingengine.com> References: <20070117093223.bcdb302e.wmoran@collaborativefusion.com> <200701181842.00696.pgsql@bluepolka.net> <1169197877.11526.10.camel@coppola.muc.ecircle.de> <200701191019.52768.pgsql@bluepolka.net> <17158.1169228703@sss.pgh.pa.us> <1169233408.21922.1170154897@webmail.messagingengine.com> Content-Type: text/plain Message-Id: <1169457850.2735.20.camel@coppola.muc.ecircle.de> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Mon, 22 Jan 2007 10:24:10 +0100 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 22 Jan 2007 09:24:10.0231 (UTC) FILETIME=[12AC1870:01C73E07] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/1185 X-Sequence-Number: 107725 On Fri, 2007-01-19 at 20:03, Jeremy Haile wrote: > Is it feasible to add a "reindex concurrently" that doesn't lock the > table for the rebuild, then locks the table when doing a second pass to > pickup rows that were changed after the first pass? Or something like > that.... IIRC, the objection was the deadlock potential of any lock upgrade, and the problems of impossible cleanup on failure if something changed the permissions of the executing user in the meantime. That's why I think it would make sense if it could be done by a privileged background thread like the autovacuum ones, so the lock upgrade can be tried without blocking, as it can take quite some time till it succeeds, and the cleanup is possible due to the privileged nature of the executor. If there would be such a facility it would also need some policies to control time windows and priorities just as for autovacuum, that's why I connect it in my usage-focused mind to autovacuum. Cheers, Csaba.