pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steve Lane <slane@soliantconsulting.com>
To: pgsql-admin@postgresql.org
Cc: Jamie Thomas <jthomas@soliantconsulting.com>
Subject: Re: Odd double queries continues
Date: Thu, 26 Aug 2004 14:33:48 -0500
Message-ID: <BD53A54C.1A8CA%slane@soliantconsulting.com> (raw)
In-Reply-To: <17568.1093531881@sss.pgh.pa.us>

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 <tgl@sss.pgh.pa.us>
> Date: Thu, 26 Aug 2004 10:51:21 -0400
> To: Steve Lane <slane@soliantconsulting.com>
> Cc: pgsql-admin@postgresql.org, Jamie Thomas <jthomas@soliantconsulting.com>
> Subject: Re: [ADMIN] Odd double queries continues
> 
> Steve Lane <slane@soliantconsulting.com> 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
> 




view thread (3+ messages)

Message-ID: <BD53A54C.1A8CA%slane@soliantconsulting.com>
Permalink:  ../BD53A54C.1A8CA%25slane@soliantconsulting.com/
Also on:    postgresql.org/message-id/BD53A54C.1A8CA%slane@soliantconsulting.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: slane@soliantconsulting.com, jthomas@soliantconsulting.com
  Subject: Re: Odd double queries continues
  In-Reply-To: <BD53A54C.1A8CA%slane@soliantconsulting.com>
  References: <17568.1093531881@sss.pgh.pa.us> <BD53A54C.1A8CA%slane@soliantconsulting.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox