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 */
|
||||
const char *allowedConninfoKeywords[] = {
|
||||
"application_name",
|
||||
"connect_timeout",
|
||||
#if defined(ENABLE_GSS) && defined(ENABLE_SSPI)
|
||||
"gsslib",
|
||||
|
|
|
@ -76,6 +76,10 @@ select count(*) from test where a = 0;
|
|||
(1 row)
|
||||
|
||||
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;
|
||||
-- Should still work (no SIGHUP yet);
|
||||
select count(*) from test where a = 0;
|
||||
|
|
|
@ -32,6 +32,9 @@ show citus.node_conninfo;
|
|||
select count(*) from test where a = 0;
|
||||
ALTER SYSTEM SET citus.node_conninfo = 'sslmode=doesnotexist';
|
||||
|
||||
-- we cannot set application name
|
||||
ALTER SYSTEM SET citus.node_conninfo = 'application_name=XXX';
|
||||
|
||||
BEGIN;
|
||||
-- Should still work (no SIGHUP yet);
|
||||
select count(*) from test where a = 0;
|
||||
|
|
Loading…
Reference in New Issue