Re: Repeatable Read Isolation Level "transaction start time" - Mailing list pgsql-general

From Ron Johnson
Subject Re: Repeatable Read Isolation Level "transaction start time"
Date
Msg-id CANzqJaCn2ueCeoiH04ipGRKXQzfaaT+kE_GU7EoJ62bVEh8OsQ@mail.gmail.com
Whole thread Raw
In response to Re: Repeatable Read Isolation Level "transaction start time"  (Greg Sabino Mullane <htamfids@gmail.com>)
List pgsql-general
On Wed, Sep 25, 2024 at 4:50 PM Greg Sabino Mullane <htamfids@gmail.com> wrote:
Since transactions should be "as short as possible, without being too short", how much time is there between when you run "BEGIN;" and the first "work statement"?

I don't know that it really matters. For something automated, it would be a few milliseconds.

That's what I'm thinking, too.  It might cause a problem if you're typing transaction commands in between drinking coffee and poking around other PgAdmin tabs, but that's your fault, not PG's fault.
 
Either way, I'm sure most people/apps already think of the initial 'BEGIN ...' as the start of the transaction, and act accordingly.

Maybe long-term something like

BEGIN   ISOLATION MODE REPEATABLE READ   SNAPSHOT NOW;

Without the "NOW", that's essentially the command used by the legacy rdbms which I used to work on.

I'm trying to remember, though, if "SET TRANSACTION READ WRITE RESERVING foo FOR <isolation level>;" (it's syntax for beginning a transaction) started the transaction, or waited until an "action" statement.  Been too long.

--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> crustacean!

pgsql-general by date:

Previous
From: Durgamahesh Manne
Date:
Subject: Re: Synchronize the dump with a logical slot with --snapshot
Next
From: Greg Sabino Mullane
Date:
Subject: Re: PgBackRest : Restore to a checkpoint shows further transactions