From 41bd464b03ad7a86472adc4f360018d33775d481 Mon Sep 17 00:00:00 2001 From: Jelte Fennema-Nio Date: Fri, 14 Jun 2024 15:13:08 +0200 Subject: [PATCH] Debug a bit --- src/test/regress/expected/multi_multiuser_auth.out | 10 +++++++++- src/test/regress/sql/multi_multiuser_auth.sql | 4 +++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/test/regress/expected/multi_multiuser_auth.out b/src/test/regress/expected/multi_multiuser_auth.out index 6b0e85b67..8995fc414 100644 --- a/src/test/regress/expected/multi_multiuser_auth.out +++ b/src/test/regress/expected/multi_multiuser_auth.out @@ -16,12 +16,20 @@ SELECT nodeid AS worker_1_id FROM pg_dist_node WHERE nodename = 'localhost' AND \gset SELECT nodeid AS worker_2_id FROM pg_dist_node WHERE nodename = 'localhost' AND nodeport = :worker_2_port \gset +SELECT * from pg_dist_node order by nodeid; + nodeid | groupid | nodename | nodeport | noderack | hasmetadata | isactive | noderole | nodecluster | metadatasynced | shouldhaveshards +--------------------------------------------------------------------- + 16 | 14 | localhost | 57637 | default | t | t | primary | default | t | t + 17 | 0 | localhost | 57636 | default | t | t | primary | default | t | f + 18 | 16 | localhost | 57638 | default | t | t | primary | default | t | t +(3 rows) + -- alice is a superuser so she can update own password CREATE USER alice PASSWORD :'alice_master_pw' SUPERUSER; CREATE USER bob PASSWORD :'bob_master_pw'; -- note we enter a wrong password for Alice to test cache invalidation INSERT INTO pg_dist_authinfo (nodeid, rolename, authinfo) VALUES -(-1, 'alice', 'password=' || :'alice_master_pw'), +(-1, 'alice', 'password=' || 'wrong_password'), (:worker_1_id, 'alice', 'password=' || 'wrong_password'), (0, 'alice', 'password=' || :'alice_fallback_pw'), (-1, 'bob', 'password=' || :'bob_master_pw'), diff --git a/src/test/regress/sql/multi_multiuser_auth.sql b/src/test/regress/sql/multi_multiuser_auth.sql index 1cd566b50..9e5dbde50 100644 --- a/src/test/regress/sql/multi_multiuser_auth.sql +++ b/src/test/regress/sql/multi_multiuser_auth.sql @@ -21,13 +21,15 @@ SELECT nodeid AS worker_1_id FROM pg_dist_node WHERE nodename = 'localhost' AND SELECT nodeid AS worker_2_id FROM pg_dist_node WHERE nodename = 'localhost' AND nodeport = :worker_2_port \gset +SELECT * from pg_dist_node order by nodeid; + -- alice is a superuser so she can update own password CREATE USER alice PASSWORD :'alice_master_pw' SUPERUSER; CREATE USER bob PASSWORD :'bob_master_pw'; -- note we enter a wrong password for Alice to test cache invalidation INSERT INTO pg_dist_authinfo (nodeid, rolename, authinfo) VALUES -(-1, 'alice', 'password=' || :'alice_master_pw'), +(-1, 'alice', 'password=' || 'wrong_password'), (:worker_1_id, 'alice', 'password=' || 'wrong_password'), (0, 'alice', 'password=' || :'alice_fallback_pw'), (-1, 'bob', 'password=' || :'bob_master_pw'),