From: Greg Stark <gsstark@mit.edu>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Greg Stark <gsstark@mit.edu>
Cc: Andrew Sullivan <ajs@crankycanuck.ca>
Cc: pgsql-sql@postgresql.org
Subject: Re: row-attribute in EXPLAIN-output doesn't match count(*)
Date: 15 Apr 2005 01:25:08 -0400
Message-ID: <87fyxsehmz.fsf@stark.xeocode.com> (raw)
In-Reply-To: <27509.1113521169@sss.pgh.pa.us>
References: <200504141838.14705.andreak@officenet.no>
<425EA496.2030501@archonet.com>
<200504141921.38476.andreak@officenet.no>
<20050414173358.GB9027@phlogiston.dyndns.org>
<8764ypf8hy.fsf@stark.xeocode.com>
<27509.1113521169@sss.pgh.pa.us>
Tom Lane <tgl@sss.pgh.pa.us> writes:
> We have to start the transaction no later than event #2 since there has
> to be something to hold the lock. But it'd be easy enough to decouple
> this from BEGIN, and it'd be good enough to solve the "COMMIT;BEGIN"
> problem.
Oh I think I finally figured out what you're saying here.
So vacuum doesn't really know what tuples are actually visible to the
snapshots actually taken by a transaction? It's making the conservative
estimate that a snapshot could have been taken as early as the start of the
transaction even if no snapshot was taken until later?
> Which of these three times do you think now() ought to correspond to?
> I recall having argued that it should be event #3 since that corresponds
> to the database snapshot you see. 100% backwards compatibility would
> require setting now() at event #1, but will anyone weep if we change that?
I think it would be weird to perform a select and see records with dates after
now(). It would also be weird to perform a select and not see records inserted
before now(). I'm not sure any of the above guarantees those criteria for READ
COMMITTED mode, but I think I'm on the same general path as you.
--
greg
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-sql@postgresql.org
Cc: gsstark@mit.edu, tgl@sss.pgh.pa.us, ajs@crankycanuck.ca
Subject: Re: row-attribute in EXPLAIN-output doesn't match count(*)
In-Reply-To: <87fyxsehmz.fsf@stark.xeocode.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