pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Neil Conway <neilc@samurai.com>
Cc: Will LaShell <will@lashell.net>
Cc: Hannu Krosing <hannu@tm.ee>
Cc: Christopher Browne <cbbrowne@acm.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: Help with count(*)
Date: Sun, 16 Nov 2003 10:22:43 -0500
Message-ID: <26338.1068996163@sss.pgh.pa.us> (raw)
In-Reply-To: <87isllbcys.fsf@mailbox.samurai.com>
References: <200311141251.38786.mallah@trade-india.com>
	<m3ad6zkpgj.fsf@wolfe.cbbrowne.com>
	<1068831807.2540.44.camel@fuji.krosing.net>
	<3FB52FA7.8060508@lashell.net>
	<4987.1068842326@sss.pgh.pa.us>
	<87isllbcys.fsf@mailbox.samurai.com>

Neil Conway <neilc@samurai.com> writes:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
>> (I believe the previous discussion also agreed that we wanted to
>> postpone the freezing of now(), which currently also happens at
>> BEGIN rather than the first command after BEGIN.)

> That doesn't make sense to me: from a user's perspective, the "start
> of the transaction" is when the BEGIN is issued, regardless of any
> tricks we may play in the backend.

That's defensible when the user issued the BEGIN himself.  When the
BEGIN is coming from some interface library's autocommit logic, it's
a lot less defensible.  If you consult the archives, you will find
actual user complaints about "why is now() returning a very old time?"
that we traced to use of interface layers that handle "commit()" by
issuing "COMMIT; BEGIN;".

When BEGIN actually is issued by live application logic, I'd expect it
to be followed immediately by some kind of command --- so the user would
be unable to tell the difference in practice.

Hannu moved this thread to -hackers, please follow up there if you want
to discuss it more.

			regards, tom lane



view thread (12+ messages)

Message-ID: <26338.1068996163@sss.pgh.pa.us>
Permalink:  ../26338.1068996163@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/26338.1068996163@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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, neilc@samurai.com, will@lashell.net, hannu@tm.ee, cbbrowne@acm.org
  Subject: Re: Help with count(*)
  In-Reply-To: <26338.1068996163@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