Fix check-multi-1

pull/7432/head
Filip Sedlak 2024-01-19 17:12:45 +01:00
parent 9796e0caa8
commit f5dda3d1b2
4 changed files with 16 additions and 16 deletions

View File

@ -587,7 +587,7 @@ SET client_min_messages TO DEBUG;
-- verify that we can create connections only with users with login privileges. -- verify that we can create connections only with users with login privileges.
SET ROLE role_without_login; SET ROLE role_without_login;
SELECT citus_check_connection_to_node('localhost', :worker_1_port); SELECT citus_check_connection_to_node('localhost', :worker_1_port);
WARNING: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "role_without_login" is not permitted to log in WARNING: connection to the remote node role_without_login@localhost:xxxxx failed with the following error: FATAL: role "role_without_login" is not permitted to log in
citus_check_connection_to_node citus_check_connection_to_node
--------------------------------------------------------------------- ---------------------------------------------------------------------
f f

View File

@ -730,7 +730,7 @@ ALTER USER test_user WITH nologin;
\c - test_user - :master_port \c - test_user - :master_port
-- reissue copy, and it should fail -- reissue copy, and it should fail
COPY numbers_hash FROM STDIN WITH (FORMAT 'csv'); COPY numbers_hash FROM STDIN WITH (FORMAT 'csv');
ERROR: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "test_user" is not permitted to log in ERROR: connection to the remote node test_user@localhost:xxxxx failed with the following error: FATAL: role "test_user" is not permitted to log in
-- verify shards in the none of the workers as marked invalid -- verify shards in the none of the workers as marked invalid
SELECT shardid, shardstate, nodename, nodeport SELECT shardid, shardstate, nodename, nodeport
FROM pg_dist_shard_placement join pg_dist_shard using(shardid) FROM pg_dist_shard_placement join pg_dist_shard using(shardid)
@ -749,7 +749,7 @@ SELECT shardid, shardstate, nodename, nodeport
-- try to insert into a reference table copy should fail -- try to insert into a reference table copy should fail
COPY numbers_reference FROM STDIN WITH (FORMAT 'csv'); COPY numbers_reference FROM STDIN WITH (FORMAT 'csv');
ERROR: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "test_user" is not permitted to log in ERROR: connection to the remote node test_user@localhost:xxxxx failed with the following error: FATAL: role "test_user" is not permitted to log in
-- verify shards for reference table are still valid -- verify shards for reference table are still valid
SELECT shardid, shardstate, nodename, nodeport SELECT shardid, shardstate, nodename, nodeport
FROM pg_dist_shard_placement join pg_dist_shard using(shardid) FROM pg_dist_shard_placement join pg_dist_shard using(shardid)
@ -765,7 +765,7 @@ SELECT shardid, shardstate, nodename, nodeport
-- since it can not insert into either copies of a shard. shards are expected to -- since it can not insert into either copies of a shard. shards are expected to
-- stay valid since the operation is rolled back. -- stay valid since the operation is rolled back.
COPY numbers_hash_other FROM STDIN WITH (FORMAT 'csv'); COPY numbers_hash_other FROM STDIN WITH (FORMAT 'csv');
ERROR: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "test_user" is not permitted to log in ERROR: connection to the remote node test_user@localhost:xxxxx failed with the following error: FATAL: role "test_user" is not permitted to log in
-- verify shards for numbers_hash_other are still valid -- verify shards for numbers_hash_other are still valid
-- since copy has failed altogether -- since copy has failed altogether
SELECT shardid, shardstate, nodename, nodeport SELECT shardid, shardstate, nodename, nodeport

View File

@ -1208,15 +1208,15 @@ set citus.enable_alter_role_propagation=true;
SET search_path TO multi_modifying_xacts; SET search_path TO multi_modifying_xacts;
-- should fail since the worker doesn't have test_user anymore -- should fail since the worker doesn't have test_user anymore
INSERT INTO reference_failure_test VALUES (1, '1'); INSERT INTO reference_failure_test VALUES (1, '1');
ERROR: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist ERROR: connection to the remote node test_user@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
-- the same as the above, but wrapped within a transaction -- the same as the above, but wrapped within a transaction
BEGIN; BEGIN;
INSERT INTO reference_failure_test VALUES (1, '1'); INSERT INTO reference_failure_test VALUES (1, '1');
ERROR: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist ERROR: connection to the remote node test_user@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
COMMIT; COMMIT;
BEGIN; BEGIN;
COPY reference_failure_test FROM STDIN WITH (FORMAT 'csv'); COPY reference_failure_test FROM STDIN WITH (FORMAT 'csv');
ERROR: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist ERROR: connection to the remote node test_user@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
COMMIT; COMMIT;
-- show that no data go through the table and shard states are good -- show that no data go through the table and shard states are good
SET client_min_messages to 'ERROR'; SET client_min_messages to 'ERROR';
@ -1242,7 +1242,7 @@ ORDER BY s.logicalrelid, sp.shardstate;
-- any failure rollbacks the transaction -- any failure rollbacks the transaction
BEGIN; BEGIN;
COPY numbers_hash_failure_test FROM STDIN WITH (FORMAT 'csv'); COPY numbers_hash_failure_test FROM STDIN WITH (FORMAT 'csv');
ERROR: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist ERROR: connection to the remote node test_user@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
ABORT; ABORT;
-- none of placements are invalid after abort -- none of placements are invalid after abort
SELECT shardid, shardstate, nodename, nodeport SELECT shardid, shardstate, nodename, nodeport
@ -1263,8 +1263,8 @@ ORDER BY shardid, nodeport;
-- verify nothing is inserted -- verify nothing is inserted
SELECT count(*) FROM numbers_hash_failure_test; SELECT count(*) FROM numbers_hash_failure_test;
WARNING: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist WARNING: connection to the remote node test_user@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
WARNING: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist WARNING: connection to the remote node test_user@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
count count
--------------------------------------------------------------------- ---------------------------------------------------------------------
0 0
@ -1290,7 +1290,7 @@ ORDER BY shardid, nodeport;
-- all failures roll back the transaction -- all failures roll back the transaction
BEGIN; BEGIN;
COPY numbers_hash_failure_test FROM STDIN WITH (FORMAT 'csv'); COPY numbers_hash_failure_test FROM STDIN WITH (FORMAT 'csv');
ERROR: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist ERROR: connection to the remote node test_user@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
COMMIT; COMMIT;
-- expect none of the placements to be market invalid after commit -- expect none of the placements to be market invalid after commit
SELECT shardid, shardstate, nodename, nodeport SELECT shardid, shardstate, nodename, nodeport
@ -1311,8 +1311,8 @@ ORDER BY shardid, nodeport;
-- verify no data is inserted -- verify no data is inserted
SELECT count(*) FROM numbers_hash_failure_test; SELECT count(*) FROM numbers_hash_failure_test;
WARNING: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist WARNING: connection to the remote node test_user@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
WARNING: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist WARNING: connection to the remote node test_user@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
count count
--------------------------------------------------------------------- ---------------------------------------------------------------------
0 0
@ -1328,7 +1328,7 @@ set citus.enable_alter_role_propagation=true;
SET search_path TO multi_modifying_xacts; SET search_path TO multi_modifying_xacts;
-- fails on all shard placements -- fails on all shard placements
INSERT INTO numbers_hash_failure_test VALUES (2,2); INSERT INTO numbers_hash_failure_test VALUES (2,2);
ERROR: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist ERROR: connection to the remote node test_user@localhost:xxxxx failed with the following error: FATAL: role "test_user" does not exist
-- connect back to the master with the proper user to continue the tests -- connect back to the master with the proper user to continue the tests
\c - :default_user - :master_port \c - :default_user - :master_port
SET search_path TO multi_modifying_xacts; SET search_path TO multi_modifying_xacts;

View File

@ -2703,10 +2703,10 @@ SET search_path TO multi_router_planner;
-- still, we never mark placements inactive. Instead, fail the transaction -- still, we never mark placements inactive. Instead, fail the transaction
BEGIN; BEGIN;
INSERT INTO failure_test VALUES (1, 1); INSERT INTO failure_test VALUES (1, 1);
ERROR: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "router_user" does not exist ERROR: connection to the remote node router_user@localhost:xxxxx failed with the following error: FATAL: role "router_user" does not exist
ROLLBACK; ROLLBACK;
INSERT INTO failure_test VALUES (2, 1); INSERT INTO failure_test VALUES (2, 1);
ERROR: connection to the remote node postgres@localhost:xxxxx failed with the following error: FATAL: role "router_user" does not exist ERROR: connection to the remote node router_user@localhost:xxxxx failed with the following error: FATAL: role "router_user" does not exist
SELECT shardid, shardstate, nodename, nodeport FROM pg_dist_shard_placement SELECT shardid, shardstate, nodename, nodeport FROM pg_dist_shard_placement
WHERE shardid IN ( WHERE shardid IN (
SELECT shardid FROM pg_dist_shard SELECT shardid FROM pg_dist_shard