public inbox for [email protected]  
help / color / mirror / Atom feed
From: Greg Sabino Mullane <[email protected]>
To: Tom Lane <[email protected]>
Cc: Peter J. Holzer <[email protected]>
Cc: [email protected]
Subject: Re: Repeatable Read Isolation Level "transaction start time"
Date: Mon, 7 Oct 2024 11:12:21 -0400
Message-ID: <CAKAnmm+iqt48mC7_PWk--7i1WB49_bX0HsjLSLs7x9k2LmmiSw@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CANzqJaBjwtzLg_bZHkokUJbtA8gy6RpHjirfdBH9OJGfn5=tmw@mail.gmail.com>
	<[email protected]>
	<CAKAnmmLDpwgqu071t_Q7Fq349dYAgQim1x46U1DCAiiTcUmU2A@mail.gmail.com>
	<CANzqJaAAQFD_JvK=ChmfdGCRNP0G5gMtVBgF52bZiFjQxH8N_Q@mail.gmail.com>
	<CAKAnmmL05Lt89EOnMW111qdUOau+dYG7u8ff5o+ckKKohnNwGg@mail.gmail.com>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>

On Sat, Oct 5, 2024 at 5:03 PM Tom Lane <[email protected]> wrote:

> As I mentioned upthread, we currently promise that xact_start matches the
> query_start of the transaction's first statement.  (I'm not sure
> how well that's documented, but the code goes out of its way to make it
> so, so somebody thought it was important.)
>

I'm not convinced this is terribly useful in practice, but it is good to
know.

I think if we wanted to do something here, it'd make more sense to keep
> xact_start as it stands and introduce a new variable
> snapshot_timestamp or something like that.


I agree; I've been thinking about something like this, as it is too hard to
try to shoehorn the information into the existing fields. Will throw this
onto my "possible patch idea" pile.

Then maybe we could have some guarantees about what you get when comparing
> other sessions'
> xact_start to your own snapshot_timestamp.  But I'm not convinced we can
> really guarantee anything without reading the snapshot_timestamp within the
> snapshot-collecting critical section, and I'm not for that.
>

Fair enough, but even a not-guaranteed 100% accurate value might be better
than the current situation, which is no (user) visibility at all about the
(MVCC) visibility. Heck, even a boolean "snapshot acquired" would be an
improvement (which becomes a subset of the info returned by a timestamp via
null/notnull).

Cheers,
Greg


view thread (11+ messages)

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Repeatable Read Isolation Level "transaction start time"
  In-Reply-To: <CAKAnmm+iqt48mC7_PWk--7i1WB49_bX0HsjLSLs7x9k2LmmiSw@mail.gmail.com>

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

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