pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Neil Conway <neilc@samurai.com>
Cc: Brendan Jurd <direvus@gmail.com>
Cc: pgsql-patches@postgresql.org
Subject: Re: Additional current timestamp values
Date: Mon, 20 Mar 2006 19:04:40 -0500
Message-ID: <9191.1142899480@sss.pgh.pa.us> (raw)
In-Reply-To: <200603202353.k2KNrKr14081@candle.pha.pa.us>
References: <200603202353.k2KNrKr14081@candle.pha.pa.us>

Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Tom Lane wrote:
>> The patch as given strikes me as pretty broken --- it does not advance
>> statement_timestamp when I would expect (AFAICS it only sets it during
>> transaction start).

> Uh, it does advance:

But not once per statement --- in reality, you get a fairly arbitrary
behavior that will advance in some cases and not others when dealing
with a multi-statement querystring.  Your example showing that it fails
to advance in a psql -c string shows this ... don't you think most
people would call that a bug?

If it's "statement" timestamp then I think it ought to advance once per
SQL statement, which this isn't doing.  (As I already said, though, that
isn't the behavior I really want.  My point is just that the code's
behavior is an extremely strange, nonintuitive definition of the word
"statement".)

> I have always been confused if
> statement_timeout times queries inside server-side functions, for
> example.  I don't think it should.

That's exactly my point; I agree that we don't want it doing that,
but that being the case, "statement" isn't a great name for the units
that we are actually processing.  We're really wanting to do these
things once per client command, or maybe per client query would be a
better name.

			regards, tom lane



view thread (21+ messages)  latest in thread

Message-ID: <9191.1142899480@sss.pgh.pa.us>
Permalink:  ../9191.1142899480@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9191.1142899480@sss.pgh.pa.us

 · 

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-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgman@candle.pha.pa.us, neilc@samurai.com, direvus@gmail.com, pgsql-patches@postgresql.org
  Subject: Re: Additional current timestamp values
  In-Reply-To: <9191.1142899480@sss.pgh.pa.us>
  References: <200603202353.k2KNrKr14081@candle.pha.pa.us> <9191.1142899480@sss.pgh.pa.us>

* 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