Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id C4EA4F47F72 for ; Wed, 28 Dec 2011 14:02:50 -0400 (AST) Received: from aperol.beccati.com ([93.94.29.238] helo=mail.beccati.com) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Rfxpw-0000KO-3P for pgsql-performance@postgresql.org; Wed, 28 Dec 2011 18:02:50 +0000 Received: (qmail 40477 invoked from network); 28 Dec 2011 19:02:21 +0100 Received: from unknown (HELO ?192.168.1.202?) (matteo@beccati.com@88.149.176.119) by mail.beccati.com with SMTP; 28 Dec 2011 18:02:21 -0000 Message-ID: <4EFB59BC.9000208@beccati.com> Date: Wed, 28 Dec 2011 19:02:36 +0100 From: Matteo Beccati User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Tom Lane CC: =?UTF-8?B?U8O2cmVuIE1leWVyLUVwcGxlcg==?= , pgsql-performance@postgresql.org Subject: Re: PostgreSQL 9.0.4 blocking in lseek? References: <4EA82B7C.1040008@google.com> <9398.1319761978@sss.pgh.pa.us> <4EFAE7F6.30603@beccati.com> In-Reply-To: <4EFAE7F6.30603@beccati.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -3.2 (---) X-Archive-Number: 201112/193 X-Sequence-Number: 45992 Hi, > A rather long import process is stuck since ~12hrs on a query that > normally returns in a few seconds or minutes. Kust like to OP there's > almost no activity on the box, only a single postgres process at 100% CPU. > > Two separate queries, (although similar) have triggered the issue, and > they are run one after another. Also, the import is also not always > failing, I think it happened twice in about 10 runs. We're expected to > go live in about two weeks so these were only test runs. > > The explain looks like this: > http://explain.depesz.com/s/TqD The query eventually completed in more than 18h. For comparison a normal run doesn't take more than 1m for that specific step. Do you think that bad stats and suboptimal plan alone could explain such a behaviour? Cheers -- Matteo Beccati Development & Consulting - http://www.beccati.com/