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 1stYXZ-00HKwj-SW for pgsql-general@arkaria.postgresql.org; Wed, 25 Sep 2024 20:23:14 +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 1stYXZ-00DisP-1U for pgsql-general@arkaria.postgresql.org; Wed, 25 Sep 2024 20:23:13 +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 1stYXY-00DisH-KF for pgsql-general@lists.postgresql.org; Wed, 25 Sep 2024 20:23:12 +0000 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1stYXU-0014eY-Qr for pgsql-general@lists.postgresql.org; Wed, 25 Sep 2024 20:23:11 +0000 Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2f75e5f3debso2198911fa.1 for ; Wed, 25 Sep 2024 13:23:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727295788; x=1727900588; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=NebZ4nCOSk4pF3D5VQhwmOnObQI1GOyfpFfp/Hc8Wr8=; b=PuS668//tXLL4yVOI6h1HlWA9szOXwrzmstixSuk3u5NBi73RBkJCYuVR57Bo0eT5x MT40QLKIVIWeHdi4zgbgRjo11N6SSBBxHC325bq4k5dgymEo5gvhDB7Qfkoc/CblRCZI ZHuo759TUTv+vptqytRoaC9JM99i3Mdv9jaeR1S5EMQOSxH+NiB92jOWMJsOUC4APa8j k/t0ayJBLHAPEz4YHyKA5qY85h428Y48IDHiAgWEW/lgBEU8cg8DbZvFFIkT9vS0dBGw T0CLrSU7T39OHu8EmKjNH6rZL2UuMyMcS5VBmCAOQyYXD6cDJO4uUnC5JWZHP15f1J5u JfvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727295788; x=1727900588; h=cc: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=NebZ4nCOSk4pF3D5VQhwmOnObQI1GOyfpFfp/Hc8Wr8=; b=R59SVL/BybavZXCnJ+8oIg4t/7fckXem7/HLDa9zsIUW1ssGauryEB8vjc2eyqPqy5 LG/yxk5vz81b9UopCXk9aq0RSjPr3c2E86LDAZXmW46qWBBduMlXLqSRYRIETKnQ/J0q C4hkeYuIdjfjOk3hjYJZEaCFuHmNvciMIOurSBhEAgHRdNV3by9pLufft9wgkQsY0lZ+ tDHjUCFBDY+tT4Wki3C1VGdwPwZJ5mdtyPYADsKWxJCM5S3tF8hr4YJIh0J5HlSKQiWj YB9ksbdTAV1nFLI6VqNtPTvI2qJNjsUUBoDdXYROFDF8+xZTdMduW+Rvpss0uZQRzmBt ORyw== X-Forwarded-Encrypted: i=1; AJvYcCUqAsw3nyPlfJDV2gEFhGzLxlCg8c8z+N/CN7Q42OoZGuXUGhillHny+4tSMMBpwWzN/5c30DVyrHTIDWTX@lists.postgresql.org X-Gm-Message-State: AOJu0Yxz6TmzkzNhWZIpg9rAmS6pKGssBAgcSjk0dqa0ElEI+9Fq1aSb 2utY1XBK3aJChfKbTwugwKrzKCUQ17YTUUxmueCWFMUGjGi+Umx3KmdCzx/IuMRCN7Sky9A9mbd zZ5P6fsPz7bmEsQkTi+O8zRt06H0= X-Google-Smtp-Source: AGHT+IGDjdcEkNS1ppyxkhVzQnkATOzkXfhVtg3Zt8avRDS5MQo5cakM18/QtWaMdAOQ1hvft5oeFueEIwXoYNwTtK4= X-Received: by 2002:a2e:4a12:0:b0:2f6:5921:f35b with SMTP id 38308e7fff4ca-2f91600ec96mr21502831fa.27.1727295787929; Wed, 25 Sep 2024 13:23:07 -0700 (PDT) MIME-Version: 1.0 References: <9CEBFAC7-4372-4FF0-8124-FFFE834B03C6@gmail.com> <3346993.1727188126@sss.pgh.pa.us> <28109.1727286817@sss.pgh.pa.us> In-Reply-To: <28109.1727286817@sss.pgh.pa.us> From: Greg Sabino Mullane Date: Wed, 25 Sep 2024 16:22:31 -0400 Message-ID: Subject: Re: Repeatable Read Isolation Level "transaction start time" To: Tom Lane Cc: Ron Johnson , "pgsql-generallists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000dc9a730622f7635f" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000dc9a730622f7635f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Sep 25, 2024 at 1:53=E2=80=AFPM Tom Lane wrote: > Because we're not going to analyze the statement in the amount of depth > needed to make that distinction before we crank up the > transactional machinery. If it says SELECT, it gets a snapshot. > Ok, thanks. So to the original poster's point, perhaps the path with the least side effects / best Principle of Least Surprise (POLS) support is to start the transaction, and immediately call a "SELECT 1;" or perhaps better still, a 'SELECT timeofday();' Cheers, Greg --000000000000dc9a730622f7635f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Wed, Sep 25, 2024 at 1:53=E2=80=AFPM T= om Lane <tgl@sss.pgh.pa.us> = wrote:
Because we're not going to analyze the statement in t= he amount of depth needed to make that distinction before we crank up the transactional machinery.=C2=A0 If it says SELECT, it gets a snapshot.

Ok, thanks. So to the original poster's = point, perhaps the path with the least side effects / best Principle of Lea= st Surprise (POLS) support is to start the transaction, and immediately cal= l a "SELECT 1;" or perhaps better still, a 'SELECT timeofday(= );'

Cheers,
Greg

--000000000000dc9a730622f7635f--