mirror of https://github.com/citusdata/citus.git
Prevent citus.node_conninfo to use "application_name"
With https://github.com/citusdata/citus/pull/5657, Citus uses a fixed application_name while connecting to remote nodes for internal purposes. It means that we cannot allow users to override it via citus.node_conninfo.pull/5697/head
parent
1e3c8e34c0
commit
1c30f61a70
|
@ -1984,7 +1984,6 @@ NodeConninfoGucCheckHook(char **newval, void **extra, GucSource source)
|
||||||
{
|
{
|
||||||
/* this array _must_ be kept in an order usable by bsearch */
|
/* this array _must_ be kept in an order usable by bsearch */
|
||||||
const char *allowedConninfoKeywords[] = {
|
const char *allowedConninfoKeywords[] = {
|
||||||
"application_name",
|
|
||||||
"connect_timeout",
|
"connect_timeout",
|
||||||
#if defined(ENABLE_GSS) && defined(ENABLE_SSPI)
|
#if defined(ENABLE_GSS) && defined(ENABLE_SSPI)
|
||||||
"gsslib",
|
"gsslib",
|
||||||
|
|
|
@ -76,6 +76,10 @@ select count(*) from test where a = 0;
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
ALTER SYSTEM SET citus.node_conninfo = 'sslmode=doesnotexist';
|
ALTER SYSTEM SET citus.node_conninfo = 'sslmode=doesnotexist';
|
||||||
|
-- we cannot set application name
|
||||||
|
ALTER SYSTEM SET citus.node_conninfo = 'application_name=XXX';
|
||||||
|
ERROR: invalid value for parameter "citus.node_conninfo": "application_name=XXX"
|
||||||
|
DETAIL: Prohibited conninfo keyword detected: application_name
|
||||||
BEGIN;
|
BEGIN;
|
||||||
-- Should still work (no SIGHUP yet);
|
-- Should still work (no SIGHUP yet);
|
||||||
select count(*) from test where a = 0;
|
select count(*) from test where a = 0;
|
||||||
|
|
|
@ -32,6 +32,9 @@ show citus.node_conninfo;
|
||||||
select count(*) from test where a = 0;
|
select count(*) from test where a = 0;
|
||||||
ALTER SYSTEM SET citus.node_conninfo = 'sslmode=doesnotexist';
|
ALTER SYSTEM SET citus.node_conninfo = 'sslmode=doesnotexist';
|
||||||
|
|
||||||
|
-- we cannot set application name
|
||||||
|
ALTER SYSTEM SET citus.node_conninfo = 'application_name=XXX';
|
||||||
|
|
||||||
BEGIN;
|
BEGIN;
|
||||||
-- Should still work (no SIGHUP yet);
|
-- Should still work (no SIGHUP yet);
|
||||||
select count(*) from test where a = 0;
|
select count(*) from test where a = 0;
|
||||||
|
|
Loading…
Reference in New Issue