Merge branch 'pg14_support' of https://github.com/citusdata/citus into pg14_support

pg14_support_3
Sait Talha Nisanci 2021-08-20 09:54:52 +03:00
commit b0b883e32c
11 changed files with 188 additions and 54 deletions

View File

@ -439,11 +439,15 @@ workflows:
- build:
name: build-12
pg_major: 12
image_tag: '12.6'
image_tag: '12.6-dev202108191715'
- build:
name: build-13
pg_major: 13
image_tag: '13.2'
image_tag: '13.2-dev202108191715'
- build:
name: build-14
pg_major: 14
image_tag: '14beta3-dev202108191715'
- check-style
- check-sql-snapshots
@ -451,151 +455,225 @@ workflows:
- test-citus:
name: 'test-12_check-multi'
pg_major: 12
image_tag: '12.6'
image_tag: '12.6-dev202108191715'
make: check-multi
requires: [build-12]
- test-citus:
name: 'test-12_check-multi-1'
pg_major: 12
image_tag: '12.6'
image_tag: '12.6-dev202108191715'
make: check-multi-1
requires: [build-12]
- test-citus:
name: 'test-12_check-mx'
pg_major: 12
image_tag: '12.6'
image_tag: '12.6-dev202108191715'
make: check-multi-mx
requires: [build-12]
- test-citus:
name: 'test-12_check-vanilla'
pg_major: 12
image_tag: '12.6'
image_tag: '12.6-dev202108191715'
make: check-vanilla
requires: [build-12]
- test-citus:
name: 'test-12_check-isolation'
pg_major: 12
image_tag: '12.6'
image_tag: '12.6-dev202108191715'
make: check-isolation
requires: [build-12]
- test-citus:
name: 'test-12_check-worker'
pg_major: 12
image_tag: '12.6'
image_tag: '12.6-dev202108191715'
make: check-worker
requires: [build-12]
- test-citus:
name: 'test-12_check-operations'
pg_major: 12
image_tag: '12.6'
image_tag: '12.6-dev202108191715'
make: check-operations
requires: [build-12]
- test-citus:
name: 'test-12_check-follower-cluster'
pg_major: 12
image_tag: '12.6'
image_tag: '12.6-dev202108191715'
make: check-follower-cluster
requires: [build-12]
- test-citus:
name: 'test-12_check-columnar'
pg_major: 12
image_tag: '12.6'
image_tag: '12.6-dev202108191715'
make: check-columnar
requires: [build-12]
- test-citus:
name: 'test-12_check-columnar-isolation'
pg_major: 12
image_tag: '12.6'
image_tag: '12.6-dev202108191715'
make: check-columnar-isolation
requires: [build-12]
- tap-test-citus:
name: 'test_12_tap-recovery'
pg_major: 12
image_tag: '12.6'
image_tag: '12.6-dev202108191715'
suite: recovery
requires: [build-12]
- test-citus:
name: 'test-12_check-failure'
pg_major: 12
image: citus/failtester
image_tag: '12.6'
image_tag: '12.6-dev202108191715'
make: check-failure
requires: [build-12]
- test-citus:
name: 'test-13_check-multi'
pg_major: 13
image_tag: '13.2'
image_tag: '13.2-dev202108191715'
make: check-multi
requires: [build-13]
- test-citus:
name: 'test-13_check-multi-1'
pg_major: 13
image_tag: '13.2'
image_tag: '13.2-dev202108191715'
make: check-multi-1
requires: [build-13]
- test-citus:
name: 'test-13_check-mx'
pg_major: 13
image_tag: '13.2'
image_tag: '13.2-dev202108191715'
make: check-multi-mx
requires: [build-13]
- test-citus:
name: 'test-13_check-vanilla'
pg_major: 13
image_tag: '13.2'
image_tag: '13.2-dev202108191715'
make: check-vanilla
requires: [build-13]
- test-citus:
name: 'test-13_check-isolation'
pg_major: 13
image_tag: '13.2'
image_tag: '13.2-dev202108191715'
make: check-isolation
requires: [build-13]
- test-citus:
name: 'test-13_check-worker'
pg_major: 13
image_tag: '13.2'
image_tag: '13.2-dev202108191715'
make: check-worker
requires: [build-13]
- test-citus:
name: 'test-13_check-operations'
pg_major: 13
image_tag: '13.2'
image_tag: '13.2-dev202108191715'
make: check-operations
requires: [build-13]
- test-citus:
name: 'test-13_check-follower-cluster'
pg_major: 13
image_tag: '13.2'
image_tag: '13.2-dev202108191715'
make: check-follower-cluster
requires: [build-13]
- test-citus:
name: 'test-13_check-columnar'
pg_major: 13
image_tag: '13.2'
image_tag: '13.2-dev202108191715'
make: check-columnar
requires: [build-13]
- test-citus:
name: 'test-13_check-columnar-isolation'
pg_major: 13
image_tag: '13.2'
image_tag: '13.2-dev202108191715'
make: check-columnar-isolation
requires: [build-13]
- tap-test-citus:
name: 'test_13_tap-recovery'
pg_major: 13
image_tag: '13.2'
image_tag: '13.2-dev202108191715'
suite: recovery
requires: [build-13]
- test-citus:
name: 'test-13_check-failure'
pg_major: 13
image: citus/failtester
image_tag: '13.2'
image_tag: '13.2-dev202108191715'
make: check-failure
requires: [build-13]
- test-citus:
name: 'test-14_check-multi'
pg_major: 14
image_tag: '14beta3-dev202108191715'
make: check-multi
requires: [build-14]
- test-citus:
name: 'test-14_check-multi-1'
pg_major: 14
image_tag: '14beta3-dev202108191715'
make: check-multi-1
requires: [build-14]
- test-citus:
name: 'test-14_check-mx'
pg_major: 14
image_tag: '14beta3-dev202108191715'
make: check-multi-mx
requires: [build-14]
- test-citus:
name: 'test-14_check-vanilla'
pg_major: 14
image_tag: '14beta3-dev202108191715'
make: check-vanilla
requires: [build-14]
- test-citus:
name: 'test-14_check-isolation'
pg_major: 14
image_tag: '14beta3-dev202108191715'
make: check-isolation
requires: [build-14]
- test-citus:
name: 'test-14_check-worker'
pg_major: 14
image_tag: '14beta3-dev202108191715'
make: check-worker
requires: [build-14]
- test-citus:
name: 'test-14_check-operations'
pg_major: 14
image_tag: '14beta3-dev202108191715'
make: check-operations
requires: [build-14]
- test-citus:
name: 'test-14_check-follower-cluster'
pg_major: 14
image_tag: '14beta3-dev202108191715'
make: check-follower-cluster
requires: [build-14]
- test-citus:
name: 'test-14_check-columnar'
pg_major: 14
image_tag: '14beta3-dev202108191715'
make: check-columnar
requires: [build-14]
- test-citus:
name: 'test-14_check-columnar-isolation'
pg_major: 14
image_tag: '14beta3-dev202108191715'
make: check-columnar-isolation
requires: [build-14]
- tap-test-citus:
name: 'test_14_tap-recovery'
pg_major: 14
image_tag: '14beta3-dev202108191715'
suite: recovery
requires: [build-14]
- test-citus:
name: 'test-14_check-failure'
pg_major: 14
image: citus/failtester
image_tag: '14beta3-dev202108191715'
make: check-failure
requires: [build-14]
- test-pg-upgrade:
name: 'test-12-13_check-pg-upgrade'
old_pg_major: 12
@ -603,10 +681,17 @@ workflows:
image_tag: 12-13
requires: [build-12,build-13]
- test-pg-upgrade:
name: 'test-13-14_check-pg-upgrade'
old_pg_major: 13
new_pg_major: 14
image_tag: 12-13-14
requires: [build-13,build-14]
- test-citus-upgrade:
name: test-12_check-citus-upgrade
pg_major: 12
image_tag: '12.6'
image_tag: '12.6-dev202108191715'
requires: [build-12]
- ch_benchmark:

View File

@ -442,8 +442,8 @@ GetExplicitStatisticsCommandList(Oid relationId)
foreach_oid(statisticsId, statisticsIdList)
{
/* we need create commands for already created stats before distribution */
char *createStatisticsCommand = pg_get_statisticsobj_worker(statisticsId,
false, false);
char *createStatisticsCommand = pg_get_statisticsobj_worker_compat(statisticsId,
false, false);
explicitStatisticsCommandList =
lappend(explicitStatisticsCommandList,

View File

@ -672,9 +672,10 @@ ShardsMatchingDeleteCriteria(Oid relationId, List *shardIntervalList,
Expr *lessThanExpr = (Expr *) linitial(andExpr->args);
Expr *greaterThanExpr = (Expr *) lsecond(andExpr->args);
RestrictInfo *lessThanRestrictInfo = make_simple_restrictinfo(NULL, lessThanExpr);
RestrictInfo *greaterThanRestrictInfo = make_simple_restrictinfo(NULL,
greaterThanExpr);
RestrictInfo *lessThanRestrictInfo = make_simple_restrictinfo_compat(NULL,
lessThanExpr);
RestrictInfo *greaterThanRestrictInfo = make_simple_restrictinfo_compat(NULL,
greaterThanExpr);
restrictInfoList = lappend(restrictInfoList, lessThanRestrictInfo);
restrictInfoList = lappend(restrictInfoList, greaterThanRestrictInfo);

View File

@ -747,7 +747,8 @@ RouterModifyTaskForShardInterval(Query *originalQuery,
continue;
}
shardRestrictionList = make_simple_restrictinfo(NULL, (Expr *) shardOpExpressions);
shardRestrictionList = make_simple_restrictinfo_compat(NULL,
(Expr *) shardOpExpressions);
extendedBaseRestrictInfo = lappend(extendedBaseRestrictInfo,
shardRestrictionList);

View File

@ -2054,7 +2054,7 @@ GetRestrictInfoListForRelation(RangeTblEntry *rangeTblEntry,
* If the restriction involves multiple tables, we cannot add it to
* input relation's expression list.
*/
Relids varnos = pull_varnos(NULL, (Node *) restrictionClause);
Relids varnos = pull_varnos_compat(NULL, (Node *) restrictionClause);
if (bms_num_members(varnos) != 1)
{
continue;

View File

@ -138,9 +138,12 @@ ListToHashSet(List *itemList, Size keySize, bool isStringList)
if (!isStringList)
{
flags |= HASH_BLOBS;
}else {
}
#if PG_VERSION_NUM >= PG_VERSION_14
else {
flags |= HASH_STRINGS;
}
#endif
HTAB *itemSet = hash_create("ListToHashSet", capacity, &info, flags);

View File

@ -12,6 +12,8 @@
#ifndef COLUMNAR_COMPAT_H
#define COLUMNAR_COMPAT_H
#include "distributed/pg_version_constants.h"
#if PG_VERSION_NUM >= PG_VERSION_14
#define ColumnarProcessUtility_compat(a, b, c, d, e, f, g, h) \
ColumnarProcessUtility(a, b, c, d, e, f, g, h)

View File

@ -50,8 +50,12 @@ char * pg_get_rule_expr(Node *expression);
extern void deparse_shard_query(Query *query, Oid distrelid, int64 shardid,
StringInfo buffer);
extern char * pg_get_triggerdef_command(Oid triggerId);
#if PG_VERSION_NUM >= PG_VERSION_14
extern char * pg_get_statisticsobj_worker(Oid statextid, bool columns_only,
bool missing_ok);
#else
extern char * pg_get_statisticsobj_worker(Oid statextid, bool missing_ok);
#endif
extern char * generate_relation_name(Oid relid, List *namespaces);
extern char * generate_qualified_relation_name(Oid relid);
extern char * generate_operator_name(Oid operid, Oid arg1, Oid arg2);

View File

@ -60,6 +60,9 @@
#define pgproc_statusflags_compat(pgproc) ((pgproc)->statusFlags)
#define get_partition_parent_compat(a, b) get_partition_parent(a, b)
#define RelationGetPartitionDesc_compat(a, b) RelationGetPartitionDesc(a, b)
#define make_simple_restrictinfo_compat(a, b) make_simple_restrictinfo(a, b)
#define pull_varnos_compat(a, b) pull_varnos(a, b)
#define pg_get_statisticsobj_worker_compat(a, b, c) pg_get_statisticsobj_worker(a, b, c)
#else
#define AlterTableStmtObjType(a) ((a)->relkind)
#define F_NEXTVAL_COMPAT F_NEXTVAL_OID
@ -93,6 +96,10 @@
((&ProcGlobal->allPgXact[(pgproc)->pgprocno])->vacuumFlags)
#define get_partition_parent_compat(a, b) get_partition_parent(a)
#define RelationGetPartitionDesc_compat(a, b) RelationGetPartitionDesc(a)
#define PQ_LARGE_MESSAGE_LIMIT 0
#define make_simple_restrictinfo_compat(a, b) make_simple_restrictinfo(b)
#define pull_varnos_compat(a, b) pull_varnos(b)
#define pg_get_statisticsobj_worker_compat(a, b, c) pg_get_statisticsobj_worker(a, c)
#endif
#if PG_VERSION_NUM >= PG_VERSION_13

View File

@ -2,11 +2,18 @@ CREATE SCHEMA alter_role;
CREATE SCHEMA ",CitUs,.TeeN!?";
-- test if the passowrd of the extension owner can be upgraded
ALTER ROLE CURRENT_USER PASSWORD 'password123' VALID UNTIL 'infinity';
SELECT run_command_on_workers($$SELECT row(rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, EXTRACT (year FROM rolvaliduntil)) FROM pg_authid WHERE rolname = current_user$$);
run_command_on_workers
SELECT run_command_on_workers($$SELECT row(rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, EXTRACT (year FROM rolvaliduntil)) FROM pg_authid WHERE rolname = current_user$$);
run_command_on_workers
---------------------------------------------------------------------
(localhost,57637,t,"(postgres,t,t,t,t,t,t,t,-1,md5891d7d5079424b1cb973187d354d78de,Infinity)")
(localhost,57638,t,"(postgres,t,t,t,t,t,t,t,-1,md5891d7d5079424b1cb973187d354d78de,Infinity)")
(localhost,57637,t,"(postgres,t,t,t,t,t,t,t,-1,Infinity)")
(localhost,57638,t,"(postgres,t,t,t,t,t,t,t,-1,Infinity)")
(2 rows)
SELECT workers.result = pg_authid.rolpassword AS password_is_same FROM run_command_on_workers($$SELECT rolpassword FROM pg_authid WHERE rolname = current_user$$) workers, pg_authid WHERE pg_authid.rolname = current_user;
password_is_same
---------------------------------------------------------------------
t
t
(2 rows)
-- test if the password and some connection settings are propagated when a node gets added
@ -16,11 +23,18 @@ SELECT row(rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlog
---------------------------------------------------------------------
(0 rows)
SELECT run_command_on_workers($$SELECT row(rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, EXTRACT (year FROM rolvaliduntil)) FROM pg_authid WHERE rolname = current_user$$);
run_command_on_workers
SELECT run_command_on_workers($$SELECT row(rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, EXTRACT (year FROM rolvaliduntil)) FROM pg_authid WHERE rolname = current_user$$);
run_command_on_workers
---------------------------------------------------------------------
(localhost,57637,t,"(postgres,t,t,t,t,t,t,t,66,md568701dc40be546e0357027fb0109338c,2032)")
(localhost,57638,t,"(postgres,t,t,t,t,t,t,t,66,md568701dc40be546e0357027fb0109338c,2032)")
(localhost,57637,t,"(postgres,t,t,t,t,t,t,t,66,2032)")
(localhost,57638,t,"(postgres,t,t,t,t,t,t,t,66,2032)")
(2 rows)
SELECT workers.result = pg_authid.rolpassword AS password_is_same FROM run_command_on_workers($$SELECT rolpassword FROM pg_authid WHERE rolname = current_user$$) workers, pg_authid WHERE pg_authid.rolname = current_user;
password_is_same
---------------------------------------------------------------------
t
t
(2 rows)
SELECT master_remove_node('localhost', :worker_1_port);
@ -35,10 +49,16 @@ SELECT row(rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlog
---------------------------------------------------------------------
(0 rows)
SELECT run_command_on_workers($$SELECT row(rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, EXTRACT (year FROM rolvaliduntil)) FROM pg_authid WHERE rolname = current_user$$);
run_command_on_workers
SELECT run_command_on_workers($$SELECT row(rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, EXTRACT (year FROM rolvaliduntil)) FROM pg_authid WHERE rolname = current_user$$);
run_command_on_workers
---------------------------------------------------------------------
(localhost,57638,t,"(postgres,t,t,t,t,t,t,t,0,md53e559cc1fcf0c70f1f8e05c9a79c3133,2052)")
(localhost,57638,t,"(postgres,t,t,t,t,t,t,t,0,2052)")
(1 row)
SELECT workers.result = pg_authid.rolpassword AS password_is_same FROM run_command_on_workers($$SELECT rolpassword FROM pg_authid WHERE rolname = current_user$$) workers, pg_authid WHERE pg_authid.rolname = current_user;
password_is_same
---------------------------------------------------------------------
t
(1 row)
SELECT 1 FROM master_add_node('localhost', :worker_1_port);
@ -52,11 +72,18 @@ SELECT row(rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlog
---------------------------------------------------------------------
(0 rows)
SELECT run_command_on_workers($$SELECT row(rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, EXTRACT (year FROM rolvaliduntil)) FROM pg_authid WHERE rolname = current_user$$);
run_command_on_workers
SELECT run_command_on_workers($$SELECT row(rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, EXTRACT (year FROM rolvaliduntil)) FROM pg_authid WHERE rolname = current_user$$);
run_command_on_workers
---------------------------------------------------------------------
(localhost,57637,t,"(postgres,t,t,t,t,t,t,t,0,md53e559cc1fcf0c70f1f8e05c9a79c3133,2052)")
(localhost,57638,t,"(postgres,t,t,t,t,t,t,t,0,md53e559cc1fcf0c70f1f8e05c9a79c3133,2052)")
(localhost,57637,t,"(postgres,t,t,t,t,t,t,t,0,2052)")
(localhost,57638,t,"(postgres,t,t,t,t,t,t,t,0,2052)")
(2 rows)
SELECT workers.result = pg_authid.rolpassword AS password_is_same FROM run_command_on_workers($$SELECT rolpassword FROM pg_authid WHERE rolname = current_user$$) workers, pg_authid WHERE pg_authid.rolname = current_user;
password_is_same
---------------------------------------------------------------------
t
t
(2 rows)
-- check user, database and postgres wide SET settings.

View File

@ -3,19 +3,23 @@ CREATE SCHEMA ",CitUs,.TeeN!?";
-- test if the passowrd of the extension owner can be upgraded
ALTER ROLE CURRENT_USER PASSWORD 'password123' VALID UNTIL 'infinity';
SELECT run_command_on_workers($$SELECT row(rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, EXTRACT (year FROM rolvaliduntil)) FROM pg_authid WHERE rolname = current_user$$);
SELECT run_command_on_workers($$SELECT row(rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, EXTRACT (year FROM rolvaliduntil)) FROM pg_authid WHERE rolname = current_user$$);
SELECT workers.result = pg_authid.rolpassword AS password_is_same FROM run_command_on_workers($$SELECT rolpassword FROM pg_authid WHERE rolname = current_user$$) workers, pg_authid WHERE pg_authid.rolname = current_user;
-- test if the password and some connection settings are propagated when a node gets added
ALTER ROLE CURRENT_USER WITH CONNECTION LIMIT 66 VALID UNTIL '2032-05-05' PASSWORD 'password456';
SELECT row(rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, EXTRACT (year FROM rolvaliduntil)) FROM pg_authid WHERE rolname = 'alter_role_1';
SELECT run_command_on_workers($$SELECT row(rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, EXTRACT (year FROM rolvaliduntil)) FROM pg_authid WHERE rolname = current_user$$);
SELECT run_command_on_workers($$SELECT row(rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, EXTRACT (year FROM rolvaliduntil)) FROM pg_authid WHERE rolname = current_user$$);
SELECT workers.result = pg_authid.rolpassword AS password_is_same FROM run_command_on_workers($$SELECT rolpassword FROM pg_authid WHERE rolname = current_user$$) workers, pg_authid WHERE pg_authid.rolname = current_user;
SELECT master_remove_node('localhost', :worker_1_port);
ALTER ROLE CURRENT_USER WITH CONNECTION LIMIT 0 VALID UNTIL '2052-05-05' PASSWORD 'password789';
SELECT row(rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, EXTRACT (year FROM rolvaliduntil)) FROM pg_authid WHERE rolname = 'alter_role_1';
SELECT run_command_on_workers($$SELECT row(rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, EXTRACT (year FROM rolvaliduntil)) FROM pg_authid WHERE rolname = current_user$$);
SELECT run_command_on_workers($$SELECT row(rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, EXTRACT (year FROM rolvaliduntil)) FROM pg_authid WHERE rolname = current_user$$);
SELECT workers.result = pg_authid.rolpassword AS password_is_same FROM run_command_on_workers($$SELECT rolpassword FROM pg_authid WHERE rolname = current_user$$) workers, pg_authid WHERE pg_authid.rolname = current_user;
SELECT 1 FROM master_add_node('localhost', :worker_1_port);
SELECT row(rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, EXTRACT (year FROM rolvaliduntil)) FROM pg_authid WHERE rolname = 'alter_role_1';
SELECT run_command_on_workers($$SELECT row(rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, rolpassword, EXTRACT (year FROM rolvaliduntil)) FROM pg_authid WHERE rolname = current_user$$);
SELECT run_command_on_workers($$SELECT row(rolname, rolsuper, rolinherit, rolcreaterole, rolcreatedb, rolcanlogin, rolreplication, rolbypassrls, rolconnlimit, EXTRACT (year FROM rolvaliduntil)) FROM pg_authid WHERE rolname = current_user$$);
SELECT workers.result = pg_authid.rolpassword AS password_is_same FROM run_command_on_workers($$SELECT rolpassword FROM pg_authid WHERE rolname = current_user$$) workers, pg_authid WHERE pg_authid.rolname = current_user;
-- check user, database and postgres wide SET settings.
-- pre check