public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: [email protected]
Subject: pgsql: contrib/isn: Make weak mode a GUC setting, and fix related funct
Date: Sun, 16 Mar 2025 17:46:00 +0000
Message-ID: <[email protected]> (raw)
contrib/isn: Make weak mode a GUC setting, and fix related functions.
isn's weak mode used to be a simple static variable, settable only
via the isn_weak(boolean) function. This wasn't optimal, as this
means it doesn't respect transactions nor respond to RESET ALL.
This patch makes isn.weak a GUC parameter instead, so that
it acts like any other user-settable parameter.
The isn_weak() functions are retained for backwards compatibility.
But we must fix their volatility markings: they were marked IMMUTABLE
which is surely incorrect, and PARALLEL RESTRICTED which isn't right
for GUC-related functions either. Mark isn_weak(boolean) as
VOLATILE and PARALLEL UNSAFE, matching set_config(). Mark isn_weak()
as STABLE and PARALLEL SAFE, matching current_setting().
Reported-by: Viktor Holmberg <[email protected]>
Diagnosed-by: Daniel Gustafsson <[email protected]>
Author: Viktor Holmberg <[email protected]>
Reviewed-by: Tom Lane <[email protected]>
Discussion: https://postgr.es/m/790bc1f9-74dc-4b50-94d2-8147315b1556@Spark
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/44890442398cf3a65230d53167e61905d2b0d348
Modified Files
--------------
contrib/isn/Makefile | 4 +--
contrib/isn/expected/isn.out | 44 +++++++++++++++++++++++++++
contrib/isn/isn--1.2--1.3.sql | 7 +++++
contrib/isn/isn.c | 27 ++++++++++++----
contrib/isn/isn.control | 2 +-
contrib/isn/isn.h | 1 -
contrib/isn/meson.build | 3 +-
contrib/isn/sql/isn.sql | 13 ++++++++
doc/src/sgml/isn.sgml | 71 ++++++++++++++++++++++++++++---------------
9 files changed, 137 insertions(+), 35 deletions(-)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: pgsql: contrib/isn: Make weak mode a GUC setting, and fix related funct
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox