Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 564B61337B61 for ; Thu, 16 Dec 2010 08:39:48 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 98058-07 for ; Thu, 16 Dec 2010 12:39:41 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from ibook.office.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by mail.postgresql.org (Postfix) with ESMTP id 796931336971 for ; Thu, 16 Dec 2010 08:39:39 -0400 (AST) Received: from [192.168.1.36] (dell36.office.archonet.com [192.168.1.36]) by ibook.office.archonet.com (Postfix) with ESMTP id 464817C04D; Thu, 16 Dec 2010 12:39:39 +0000 (GMT) Message-ID: <4D0A088B.6020505@archonet.com> Date: Thu, 16 Dec 2010 12:39:39 +0000 From: Richard Huxton User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: Eric Comeau CC: pgsql-performance@postgresql.org Subject: Re: How to get FK to use new index without restarting the database References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.918 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RDNS_DYNAMIC=0.982 X-Spam-Level: X-Archive-Number: 201012/194 X-Sequence-Number: 41646 On 16/12/10 12:12, Eric Comeau wrote: > > The problem surfaced at one of our client installs where a maintenance > DELETE query was running for over 24 hrs. We have since then identified > the missing indexes and have sent the client a script to create them, > but in our testing we could not been able to get postgres to use the new > index for the FK cascade delete without bouncing the database. Well, an ongoing DELETE isn't going to see a new index. I'd have thought a new connection should though. -- Richard Huxton Archonet Ltd