Merge pull request #5697 from citusdata/improve_nodecon_info

Prevent citus.node_conninfo to use "application_name"
pull/5693/head
Önder Kalacı 2022-02-09 13:38:36 +01:00 committed by GitHub
commit 60ce24578f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

View File

@ -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",

View File

@ -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;

View File

@ -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;