Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 0B1D0650070 for ; Thu, 30 Oct 2008 22:23:31 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 64637-07 for ; Thu, 30 Oct 2008 22:23:28 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp.01.com (lb-2.01.com [38.98.186.147]) by postgresql.org (Postfix) with ESMTP id 4768C64FD24 for ; Thu, 30 Oct 2008 22:23:28 -0300 (ADT) Received: from asav-2.01.com (localhost.localdomain [127.0.0.1]) by asav-2.01.com (8.13.1/8.13.1) with SMTP id m9V1NL0Y030834; Thu, 30 Oct 2008 20:23:21 -0500 Received: from smtp-2.01.com (smtp-2.01.com [38.98.186.158]) by asav-2.01.com (asav-2.01.com [10.25.1.12]) id k9YKNL2278814503ck ret-id none; Thu, 30 Oct 2008 20:23:21 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp-2.01.com (Postfix) with ESMTP id C20261AD3CB; Thu, 30 Oct 2008 20:23:20 -0500 (CDT) Received: from smtp-2.01.com ([127.0.0.1]) by localhost (smtp-2.01.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MWeWlIutzsIq; Thu, 30 Oct 2008 20:23:20 -0500 (CDT) Received: from [10.10.10.18] (8.202-62-69.ftth.swbr.surewest.net [69.62.202.8]) by smtp-2.01.com (Postfix) with ESMTP id 5C4871AD3B0; Thu, 30 Oct 2008 20:23:20 -0500 (CDT) Message-ID: <490A5DCB.9060403@frostconsultingllc.com> Date: Thu, 30 Oct 2008 18:22:19 -0700 From: Jeff Frost Organization: Frost Consulting, LLC User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Tom Lane CC: pgsql-performance@postgresql.org Subject: Re: Index usage problem on 8.3.3 References: <490A4EBE.9030804@frostconsultingllc.com> <13272.1225413116@sss.pgh.pa.us> <490A56C1.8020804@frostconsultingllc.com> <14519.1225415657@sss.pgh.pa.us> In-Reply-To: <14519.1225415657@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-FSL-MailScanner-Information: Please contact postmaster@01.com for more information X-FSL-MailScanner: Found to be clean X-FSL-MailScanner-SpamCheck: X-FSL-MailScanner-From: jeff@frostconsultingllc.com X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200810/140 X-Sequence-Number: 31721 Tom Lane wrote: > Okay. What that means is that the indexes were created on data that had > already been inserted and updated to some extent, resulting in > HOT-update chains that turned out to be illegal for the new indexes. > The way we deal with this is to mark the indexes as not usable by any > query that can still see the dead HOT-updated tuples. > > Your best bet for dodging the problem is probably to break the operation > into two transactions, if that's possible. INSERT and UPDATE in the > first xact, create the indexes at the start of the second. (Hmm ... > I'm not sure if that's sufficient if there are other concurrent > transactions; but it's certainly necessary.) Another possibility is > to create the indexes just after data load, before you start updating > the columns they're on. > > Thanks Tom! Any idea why I don't see it on 8.3.4? -- Jeff Frost, Owner Frost Consulting, LLC http://www.frostconsultingllc.com/ Phone: 916-647-6411 FAX: 916-405-4032