diff --git a/src/test/regress/expected/other_databases.out b/src/test/regress/expected/other_databases.out index 9e170861e..9adb818ba 100644 --- a/src/test/regress/expected/other_databases.out +++ b/src/test/regress/expected/other_databases.out @@ -71,6 +71,15 @@ SELECT citus_internal.execute_command_on_remote_nodes_as_user($$SELECT 'dangerou ERROR: operation is not allowed HINT: Run the command with a superuser. \c other_db1 +SET citus.local_hostname TO '127.0.0.1'; +SET ROLE nonsuperuser; +-- Make sure that we don't try to access pg_dist_node. +-- Otherwise, we would get the following error: +-- ERROR: cache lookup failed for pg_dist_node, called too early? +CREATE USER other_db_user9; +ERROR: cache lookup failed for pg_dist_node, called too early? +RESET ROLE; +RESET citus.local_hostname; SET ROLE nonsuperuser; CREATE USER other_db_user9; RESET ROLE; diff --git a/src/test/regress/sql/other_databases.sql b/src/test/regress/sql/other_databases.sql index 563793518..0c81a655c 100644 --- a/src/test/regress/sql/other_databases.sql +++ b/src/test/regress/sql/other_databases.sql @@ -51,6 +51,17 @@ SET ROLE nonsuperuser; SELECT citus_internal.execute_command_on_remote_nodes_as_user($$SELECT 'dangerous query'$$, 'postgres'); \c other_db1 +SET citus.local_hostname TO '127.0.0.1'; +SET ROLE nonsuperuser; + +-- Make sure that we don't try to access pg_dist_node. +-- Otherwise, we would get the following error: +-- ERROR: cache lookup failed for pg_dist_node, called too early? +CREATE USER other_db_user9; + +RESET ROLE; +RESET citus.local_hostname; + SET ROLE nonsuperuser; CREATE USER other_db_user9;