Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1st58Q-00DPWp-KT for pgsql-general@arkaria.postgresql.org; Tue, 24 Sep 2024 12:59:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1st58P-007fvM-Ut for pgsql-general@arkaria.postgresql.org; Tue, 24 Sep 2024 12:59:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1st58P-007fvE-Jo for pgsql-general@lists.postgresql.org; Tue, 24 Sep 2024 12:59:17 +0000 Received: from mail-oo1-xc36.google.com ([2607:f8b0:4864:20::c36]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1st58L-000qGM-B5 for pgsql-general@lists.postgresql.org; Tue, 24 Sep 2024 12:59:17 +0000 Received: by mail-oo1-xc36.google.com with SMTP id 006d021491bc7-5e5568f1b6eso2592572eaf.1 for ; Tue, 24 Sep 2024 05:59:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727182753; x=1727787553; darn=lists.postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=NqUE5ZY9+mhXORgXYWcKnzbKiPtEBU9Xn3lgjTAtzNM=; b=KYloc5TIIPaKJ4U3alnBAH93IJZT+rAaYFY/C+MEhSpEGyVkYnFDC7uzWS6QUj4NV4 kYmbtYNzfuDsJUC6QW4eZZUs6x8kqxYIYxGYwEN5nzToRjA2CxWV+YgTZq2PNL7fn/Ja DucjFUMJkt9S2Uql6hIgHQsFuI6OiJ19L5DNPZKzqe/pf/cPQC/S6C3vvSCi7O6+4ZVW M2+X6/z2BLHW9bfqfkmJkmArVjCTKIrOmMd2NZc50ytgYWbxEDa2btObc50zaOVdshnv JPYvEgnlJhDEtBIxsTF3h9zGtSySZ11hLInYBbJB869fgHh3j/nMih87KwlaXZeNNcrr VG4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727182753; x=1727787553; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NqUE5ZY9+mhXORgXYWcKnzbKiPtEBU9Xn3lgjTAtzNM=; b=elWYCHTmqyoUJH+czBAtcv5VHSU5WqplfREDqGwGl/mTGg9nkjPysxOmQmrl7yeY8B Q/sVtoIGQTqG7DOsPy+O3jIRRSRnK9NLEkbU4eeyf8wTQOJ3nYPC1j+XkO9K+NqX3Gar pyquEdSN3ZpZk6UySU1zRVHBd8afTLBQdRuC+gHE/yGiOgKCX/2OUeHykyziIPAbKZZD b/3ZnSullcowjQnjNs6jsxjN3OOqm2DkqYG0R6nFxaQYZXwiy9V3iTwlNiRug5OG+2kN QKVNuFoaG06PbA7nr1n4CZhcYn2gIIx7QyBBZIbpK99tmQGcsX2OntHtKOX0spV8dswd MjLw== X-Gm-Message-State: AOJu0YwGGl/QOtsqw2UL0BaiWh8LtztUoDzCjAam0MVPl8XNbY71QqWt 2pHp03Ny2jR36zMZWNmvTpusSEnWLosCse6xrMaUKVNGRkFKTVChcyuGyCggAguSV+8pCEjgxUl l+WkC7QZDSGmFzXiGaXiKw7sAUDRjtQ== X-Google-Smtp-Source: AGHT+IHDvuOR8R7pKKK2CkdKc/h9mhHiF7iuZ1vTbUVbD7Oawq6SA9VNj7AIOdTJzj0U1tqihIe5VKpI3+kiUNT7aps= X-Received: by 2002:a4a:be97:0:b0:5e5:b728:9962 with SMTP id 006d021491bc7-5e5b7289bf6mr1679608eaf.8.1727182752693; Tue, 24 Sep 2024 05:59:12 -0700 (PDT) MIME-Version: 1.0 References: <9CEBFAC7-4372-4FF0-8124-FFFE834B03C6@gmail.com> In-Reply-To: From: Ron Johnson Date: Tue, 24 Sep 2024 08:59:01 -0400 Message-ID: Subject: Re: Repeatable Read Isolation Level "transaction start time" To: "pgsql-general@lists.postgresql.org" Content-Type: multipart/alternative; boundary="0000000000006fccb90622dd12e6" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000006fccb90622dd12e6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Sep 24, 2024 at 8:29=E2=80=AFAM David G. Johnston < david.g.johnston@gmail.com> wrote: > On Monday, September 23, 2024, Wizard Brony 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: >> >> =E2=80=9CUPDATE, DELETE, MERGE, SELECT FOR UPDATE, and SELECT FOR SHARE = commands >> behave the same as SELECT in terms of searching for target rows: they wi= ll >> only find target rows that were committed as of the transaction start ti= me.=E2=80=9D >> >> 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 earl= ier >> 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. > Huh? --=20 Death to , and butter sauce. Don't boil me, I'm still alive. crustacean! --0000000000006fccb90622dd12e6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Sep 24, 2024 at 8:29=E2=80=AFAM D= avid G. Johnston <david.g.= johnston@gmail.com> wrote:
On Monday, September 23, 2024,= Wizard Brony <wizardbrony@gmail.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:

=E2=80=9CUPDATE, DELETE, MERGE, SELECT FOR UPDATE, and SELECT FOR SHARE com= mands 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.=E2=80=9D

What is defined as the "transaction start time?" When I first rea= d 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-contro= l 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 can= not start at begin because once it does start it cannot be modified.
<= /blockquote>
=C2=A0
Huh?

--
Death to <Redacted>, and butter sa= uce.
Don't boil me, I'm still alive.
<Redacted&= gt; crustacean!
--0000000000006fccb90622dd12e6--