Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 3CD82B5DC0F for ; Mon, 31 Oct 2011 13:17:28 -0300 (ADT) 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 49677-08 for ; Mon, 31 Oct 2011 16:17:22 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by mail.postgresql.org (Postfix) with ESMTP id DB53BB5DC33 for ; Mon, 31 Oct 2011 13:17:21 -0300 (ADT) Received: from wpaz1.hot.corp.google.com (wpaz1.hot.corp.google.com [172.24.198.65]) by smtp-out.google.com with ESMTP id p9VGHKZT030911 for ; Mon, 31 Oct 2011 09:17:20 -0700 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1320077840; bh=hL4krBBqJVtVTrkd3PFIu6pLPPI=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=bX/ErHvbIqM1WNwtHR5xqAF6XS75yoY2STPuqDu+0DSGZYt7lfhw0M2YHvMeHPOUd 95JRLo9P4PO2U+VxLvJIg== DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=dkim-signature:message-id:date:from:user-agent: mime-version:to:cc:subject:references:in-reply-to:content-type: content-transfer-encoding:x-system-of-record; b=A20hnSO7iyRdgPb/ivtO5fI84KFbRrbrbueEMwrTrYSD6orSvct5K1REDFgThv3b/ BcsrFvT+MO4A2jIyGVCvw== Received: from faak28 (faak28.prod.google.com [10.223.15.156]) by wpaz1.hot.corp.google.com with ESMTP id p9VGHHgf016175 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Mon, 31 Oct 2011 09:17:18 -0700 Received: by faak28 with SMTP id k28so2541855faa.7 for ; Mon, 31 Oct 2011 09:17:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=4Y4SDRoWsfSKvdB3/xHbC6xW0K6BopRSHOPkkfwFvrU=; b=nygTUgyc+K68H+DrhG28JJmRmnJC9514W7zu80VYUwHt7YnHm4hPezsLeTouocHwPw acc9Usqq/hpOXYScvFrw== Received: by 10.223.15.13 with SMTP id i13mr30105728faa.36.1320077837590; Mon, 31 Oct 2011 09:17:17 -0700 (PDT) Received: by 10.223.15.13 with SMTP id i13mr30105698faa.36.1320077837355; Mon, 31 Oct 2011 09:17:17 -0700 (PDT) Received: from ?IPv6:2620:0:105f:1:d42e:c230:45d0:32a5? ([2620:0:105f:1:d42e:c230:45d0:32a5]) by mx.google.com with ESMTPS id a8sm38770302faa.11.2011.10.31.09.17.16 (version=SSLv3 cipher=OTHER); Mon, 31 Oct 2011 09:17:16 -0700 (PDT) Message-ID: <4EAECA0B.8050908@google.com> Date: Mon, 31 Oct 2011 17:17:15 +0100 From: =?ISO-8859-1?Q?S=F6ren_Meyer-Eppler?= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Tom Lane CC: pgsql-performance@postgresql.org Subject: Re: PostgreSQL 9.0.4 blocking in lseek? References: <4EA82B7C.1040008@google.com> <9398.1319761978@sss.pgh.pa.us> <4EAEAC21.5080209@google.com> <27430.1320074881@sss.pgh.pa.us> In-Reply-To: <27430.1320074881@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-System-Of-Record: true X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-3.101 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-1.201 X-Spam-Level: X-Archive-Number: 201110/279 X-Sequence-Number: 45501 > Note the file number appearing in the lseeks, run "lsof -p PID" against > the backend process to discover the actual filename of that file, then > look for a match to the filename in pg_class.relfilenode. Will do. I need to reproduce the error first which may take a while. >> I have attached two of the offending execution plans. Anything obviously >> wrong with them? > > What makes you say these are "offending execution plans"? Both of them > seem to be completing just fine. That's exactly the point. The plan looks good, the execution times will usually be good. But sometimes, for no immediately obvious reasons, they'll run for hours. I know these are the offending queries because this is what "select now() - query_start, current_query from pg_stat_activity" will tell me. We execute these queries from a Java program via JDBC (postgresql-9.1-901.jdbc4.jar). But since little data is being transferred between the Java client and the database I hope that cannot be the issue. Anything else I should look out for/log during the next test run? Sören