Re: Repeatable Read Isolation Level "transaction start time"

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Wizard Brony <wizardbrony(at)gmail(dot)com>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Repeatable Read Isolation Level "transaction start time"
Date: 2024-09-24 12:28:51
Message-ID: CAKFQuwYvh02jtAAmybAPGC00k-AWiOqm3vT2Aj3m8dKLO+fugg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Monday, September 23, 2024, Wizard Brony <wizardbrony(at)gmail(dot)com> wrote:

> https://www.postgresql.org/docs/16/transaction-iso.html#
> XACT-REPEATABLE-READ
>
> The PostgreSQL documentation for the Repeatable Read Isolation Level
> states the following:
>
> “UPDATE, DELETE, MERGE, SELECT FOR UPDATE, and SELECT FOR SHARE commands
> behave the same as SELECT in terms of searching for target rows: they will
> only find target rows that were committed as of the transaction start time.”
>
> What is defined as the "transaction start time?" When I first read the
> statement, I interpreted it as the start of the transaction:
>
> BEGIN;
> SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
>
> But in my testing, I find that according to that statement, the
> transaction start time is actually "the start of the first
> non-transaction-control statement in the transaction" (as mentioned earlier
> in the section). Is my conclusion correct, or am I misunderstanding the
> documentation?
>
>
Probably, since indeed the transaction cannot start at begin because once
it does start it cannot be modified.

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Johnson 2024-09-24 12:59:01 Re: Repeatable Read Isolation Level "transaction start time"
Previous Message Ayush Vatsa 2024-09-24 11:14:38 Issues with PostgreSQL Source Code Installation