public inbox for [email protected]
help / color / mirror / Atom feedFrom: Jelte Fennema-Nio <[email protected]>
To: Tom Lane <[email protected]>
Cc: Alexey Klyukin <[email protected]>
Cc: Alexander Kukushkin <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Subject: Re: Report search_path value back to the client.
Date: Fri, 3 Nov 2023 10:22:35 +0100
Message-ID: <CAGECzQRC4Rd4qkMeg4bT_e51BYNQbMcBwdzc1hPWMhTC+DKgqg@mail.gmail.com> (raw)
In-Reply-To: <CAGECzQQ6xFcgrg+e0p9mCumtK362TiA6vTiiZKoYbS8OXggwuQ@mail.gmail.com>
References: <CAFh8B=k8s7WrcqhafmYhdN1+E5LVzZi_QaYDq8bKvrGJTAhY2Q@mail.gmail.com>
<CAAS3tyLsyaAeimsUxAw_RMKY_GnPVN3ntJ9ncr=5E4Q6z1+96g@mail.gmail.com>
<[email protected]>
<CAGECzQQ6xFcgrg+e0p9mCumtK362TiA6vTiiZKoYbS8OXggwuQ@mail.gmail.com>
For completeness attached is a tiny patch implementing this, so this
thread can be added to the commit fest.
Attachments:
[application/octet-stream] v1-0001-Mark-search_path-as-GUC_REPORT.patch (1.2K, ../CAGECzQRC4Rd4qkMeg4bT_e51BYNQbMcBwdzc1hPWMhTC+DKgqg@mail.gmail.com/2-v1-0001-Mark-search_path-as-GUC_REPORT.patch)
download | inline diff:
From 200ecdeb0e9771f4d0b3ec8a5d7b11a5562a8563 Mon Sep 17 00:00:00 2001
From: Jelte Fennema-Nio <[email protected]>
Date: Fri, 3 Nov 2023 10:09:52 +0100
Subject: [PATCH v1] Mark search_path as GUC_REPORT
Connection poolers use GUC_REPORT to track session level SET when using
transaction pooling. search_path is one of the biggest foot guns. Having
an unexpected search_path often breaks running of queries. And many
applications set a search_path at the session level, pg_dump being one
of those.
---
src/backend/utils/misc/guc_tables.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/backend/utils/misc/guc_tables.c b/src/backend/utils/misc/guc_tables.c
index 7605eff9b9d..52e70da6638 100644
--- a/src/backend/utils/misc/guc_tables.c
+++ b/src/backend/utils/misc/guc_tables.c
@@ -4135,7 +4135,7 @@ struct config_string ConfigureNamesString[] =
{"search_path", PGC_USERSET, CLIENT_CONN_STATEMENT,
gettext_noop("Sets the schema search order for names that are not schema-qualified."),
NULL,
- GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_EXPLAIN
+ GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_EXPLAIN | GUC_REPORT
},
&namespace_search_path,
"\"$user\", public",
base-commit: 39c959ef25bd9cdd966ee024ab14f8f4214bb276
--
2.34.1
view thread (2+ messages)
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], [email protected], [email protected]
Subject: Re: Report search_path value back to the client.
In-Reply-To: <CAGECzQRC4Rd4qkMeg4bT_e51BYNQbMcBwdzc1hPWMhTC+DKgqg@mail.gmail.com>
* 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