X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 597B15E3632 for ; Thu, 26 Aug 2004 16:34:02 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 86694-05 for ; Thu, 26 Aug 2004 19:33:59 +0000 (GMT) Received: from mammoth.utopiasystems.net (meridian1.utopiasystems.net [66.150.45.40]) by svr1.postgresql.org (Postfix) with ESMTP id 90C8A5E46C3 for ; Thu, 26 Aug 2004 16:33:58 -0300 (ADT) Received: from [192.168.1.100] ([67.173.111.107]) by mammoth.utopiasystems.net with Microsoft SMTPSVC(6.0.3790.0); Thu, 26 Aug 2004 15:31:40 -0400 User-Agent: Microsoft-Entourage/10.1.4.030702.0 Date: Thu, 26 Aug 2004 14:33:48 -0500 Subject: Re: Odd double queries continues From: Steve Lane To: Cc: Jamie Thomas Message-ID: In-Reply-To: <17568.1093531881@sss.pgh.pa.us> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-OriginalArrivalTime: 26 Aug 2004 19:31:40.0562 (UTC) FILETIME=[4FA8F720:01C48BA3] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=RCVD_IN_RFCI X-Spam-Level: X-Archive-Number: 200408/268 X-Sequence-Number: 14663 Okay, that's helpful. I found the relevant code in /backend/tcop/postgres.c and it's as you say, process start vs query start ... OK, so these numbers are OS-level page faults. Can you help me understand what a page fault on an update would mean? Is it that the disk page containing some or all of the row to be updated is not found in the OS cache? Lastly, any idea why I would see executor stats twice (or in one case this morning) three times in a row? Is it actually re-running the query? Here's one last oddness: the vast bulk of these problem queries occur when we're updating a session table, where our logic is: 1) Send the query as an INSERT 2) See if it fails 3) If so, resend as an UPDATE The initial INSERTs never show this kind of problem, only the subsequent UPDATES. Is there something in our pattern that somehow increases the possibility of a cache miss? The example of sequential reads on a non-interleaved hard drive comes to mind, but I can't imagine that that's useful except in some vague metaphorical way ... -- sgl > From: Tom Lane > Date: Thu, 26 Aug 2004 10:51:21 -0400 > To: Steve Lane > Cc: pgsql-admin@postgresql.org, Jamie Thomas > Subject: Re: [ADMIN] Odd double queries continues > > Steve Lane writes: >> I realize no one may have any insight in the whole problem, but can anyone >> at least tell me the significance of each of these numbers from the stats: >> 261/10 [691/281] page faults/reclaims, 0 [0] swaps > > It's just repeating what getrusage() told it. See the docs for your > operating system. > > It looks like the numbers inside the square brackets are totals since > process start, while the ones before are the delta since query start. > > regards, tom lane >