Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 2C871635498 for ; Tue, 6 Apr 2010 14:33:24 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 18687-01-9 for ; Tue, 6 Apr 2010 17:33:13 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp2.ca.com (smtp2.ca.com [141.202.248.13]) by mail.postgresql.org (Postfix) with ESMTP id 01BBA6354F1 for ; Tue, 6 Apr 2010 13:25:44 -0300 (ADT) Received: from athena.ca.com ([130.200.164.17]) by smtp2.ca.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 6 Apr 2010 12:25:43 -0400 Message-ID: <4BBB604F.6060005@ca.com> Date: Tue, 06 Apr 2010 09:24:47 -0700 From: Brian Cox User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20091204 Lightning/1.0b1 Thunderbird/3.0 MIME-Version: 1.0 To: "Craig Ringer [craig@postnewspapers.com.au]" CC: "pgsql-performance@postgresql.org" Subject: Re: query slow; strace output worrisome Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 06 Apr 2010 16:25:43.0971 (UTC) FILETIME=[CE3A0730:01CAD5A5] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.74 tagged_above=-10 required=5 tests=BAYES_20=-0.74 X-Spam-Level: X-Archive-Number: 201004/54 X-Sequence-Number: 38304 On 04/06/2010 01:18 AM, Craig Ringer [craig@postnewspapers.com.au] wrote: > I'm wondering if the issue is with strace rather than Pg. That is to > say, that strace is trying to print: Thanks, Craig: I do think that this is a strace issue. > As for what Pg is doing: creat() returns -1 on error and a file > descriptor otherwise, so the return value appears to indicate success. > I'm kind of wondering what the Pg backend is actually _doing_ though - > if it was using sort temp files you'd expect > open()/write()/read()/close() not just creat() calls. My quesiton exactly: what is the backend doing calling creat() over and over again? Note that this query does complete -- in 30-40 mins. Brian