Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 4E694B5DBFB for ; Wed, 26 Oct 2011 12:57:50 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 60270-02-2 for ; Wed, 26 Oct 2011 15:57:44 +0000 (UTC) X-Greylist: delayed 00:10:30.08663 by SQLgrey-1.8.0-rc2 Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by mail.postgresql.org (Postfix) with ESMTP id 12201B5DCCB for ; Wed, 26 Oct 2011 12:57:43 -0300 (ADT) Received: from wpaz13.hot.corp.google.com (wpaz13.hot.corp.google.com [172.24.198.77]) by smtp-out.google.com with ESMTP id p9QFlCLE001145 for ; Wed, 26 Oct 2011 08:47:12 -0700 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1319644032; bh=c07o/qvXB0S6OuZt7P2hTo85AGM=; h=Message-ID:Date:From:MIME-Version:To:Subject:Content-Type: Content-Transfer-Encoding; b=tp9+umh7bLisfk4zBA+6WZbVcf1tiCO+0LUOFw0CZppRbeJWoVySfut8qSlmXXnNf Xj+aI20VHNeG1e+yKecRw== 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:subject:content-type: content-transfer-encoding:x-system-of-record; b=T8fYjf00bmkYz3vlh8B1Kb0OvLI0tG8cPD+3qkU6QK6DJaDKT41F1SsPpL0+FPRwm 4Cm7/y6YJabM6K7X3zXuw== Received: from fagn18 (fagn18.prod.google.com [10.223.53.210]) by wpaz13.hot.corp.google.com with ESMTP id p9QFktqD026439 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Wed, 26 Oct 2011 08:47:11 -0700 Received: by fagn18 with SMTP id n18so825463fag.5 for ; Wed, 26 Oct 2011 08:47:11 -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:subject :content-type:content-transfer-encoding; bh=BdVYjCduk0fS3Ykw9lZ7+APmucJCvYsTmQWmGlL7Wd0=; b=R1kEokkeA0OB0QkEjjSDOb7ad9Man5AVp2nLDxHAaat2GGoC6jcD0XuXnpc6rzXsCW 9sI2NtYIvJhdM2FW2j/w== Received: by 10.223.15.13 with SMTP id i13mr23419960faa.36.1319644031304; Wed, 26 Oct 2011 08:47:11 -0700 (PDT) Received: by 10.223.15.13 with SMTP id i13mr23419923faa.36.1319644030975; Wed, 26 Oct 2011 08:47:10 -0700 (PDT) Received: from ?IPv6:2620:0:105f:1:381b:c850:8ad9:74ee? ([2620:0:105f:1:381b:c850:8ad9:74ee]) by mx.google.com with ESMTPS id n25sm4747290fah.15.2011.10.26.08.47.09 (version=SSLv3 cipher=OTHER); Wed, 26 Oct 2011 08:47:10 -0700 (PDT) Message-ID: <4EA82B7C.1040008@google.com> Date: Wed, 26 Oct 2011 17:47:08 +0200 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: pgsql-performance@postgresql.org Subject: PostgreSQL 9.0.4 blocking in lseek? 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=-2.404 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201110/226 X-Sequence-Number: 45448 We are running into a significant performance issue with "PostgreSQL 9.0.4 on x86_64-pc-linux-gnu, compiled by GCC gcc-4.4.real (Debian 4.4.5-8) 4.4.5, 64-bit" (the version string pqAdmin displays). A fairly complex insert query on an empty destination table will run for an indefinite amount of time (we waited literally days for the query to complete). This does not happen every time we run the query but often. Now ordinarily I'd assume we did something wrong with our indices or query, but the execution plan looks sane and, more tellingly, we have: - no CPU load - no network traffic - no disk I/O - no other load on the server except this single query and strace displaying a seemingly endless list of lseek calls. So my assumption is that we are not running into bad Big-O() runtime behavior but rather into some locking problem. Any ideas what might cause this? Workarounds we could try? thank you, Sören