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 1tt5pv-008WzB-Tr for pgsql-bugs@arkaria.postgresql.org; Fri, 14 Mar 2025 14:16:31 +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 1tt5pt-008Ydm-Oa for pgsql-bugs@arkaria.postgresql.org; Fri, 14 Mar 2025 14:16:29 +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 1tt5pt-008Yde-Fq for pgsql-bugs@lists.postgresql.org; Fri, 14 Mar 2025 14:16:29 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tt5pp-002qbi-2p for pgsql-bugs@lists.postgresql.org; Fri, 14 Mar 2025 14:16:29 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 52EEGOgb3052532; Fri, 14 Mar 2025 10:16:24 -0400 From: Tom Lane To: Daniel Gustafsson cc: Viktor Holmberg , pgsql-bugs@lists.postgresql.org Subject: Re: ISN extension - wrong volatility level for isn_weak() function In-reply-to: <51C655A4-46FB-4A40-BAE5-26A76B31D3EE@yesql.se> References: <790bc1f9-74dc-4b50-94d2-8147315b1556@Spark> <51C655A4-46FB-4A40-BAE5-26A76B31D3EE@yesql.se> Comments: In-reply-to Daniel Gustafsson message dated "Fri, 14 Mar 2025 14:29:55 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3052530.1741961784.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 14 Mar 2025 10:16:24 -0400 Message-ID: <3052531.1741961784@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Daniel Gustafsson writes: > On 14 Mar 2025, at 12:49, Viktor Holmberg wrote: >> The isn_weak function in the isn extension reports the wrong value if y= ou look at it inside a transaction: > I wonder if this should really be marked VOLATILE instead as it has a si= de > effect. Indeed. This whole area seems really poorly considered. The comment in isn--1.1.sql says -- isn_weak(boolean) - Sets the weak input mode. -- This function is intended for testing use only! despite which it's documented at length in isn.sgml. On the other hand, so far as I can find it's tested nowhere, which means none of the "weak mode" code is getting exercised. regards, tom lane