From: Tom Lane <tgl@sss.pgh.pa.us>
To: 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: Fri, 14 Nov 2003 15:38:46 -0500
Message-ID: <4987.1068842326@sss.pgh.pa.us> (raw)
In-Reply-To: <3FB52FA7.8060508@lashell.net>
References: <200311141251.38786.mallah@trade-india.com>
<m3ad6zkpgj.fsf@wolfe.cbbrowne.com>
<1068831807.2540.44.camel@fuji.krosing.net>
<3FB52FA7.8060508@lashell.net>
Will LaShell <will@lashell.net> writes:
> Hannu Krosing wrote:
>> Can't the backend be made to delay the "real" start of transaction until
>> the first query gets executed ?
> That seems counter intuitive doesn't it? Why write more code in the
> server when the client is the thing that has the problem?
Because there are a lot of clients with the same problem :-(
A more principled argument is that we already postpone the setting of
the transaction snapshot until the first query arrives within the
transaction. In a very real sense, the setting of the snapshot *is*
the start of the transaction. So it would make sense if incidental
stuff like VACUUM also thought that the transaction hadn't started
until the first query arrives. (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.)
regards, tom lane
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, will@lashell.net, hannu@tm.ee, cbbrowne@acm.org
Subject: Re: Help with count(*)
In-Reply-To: <4987.1068842326@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