I have a problem with creating a new user in Amazon Redshift. I followed the description on Getting Started with Amazon Redshift and was able to create a cluster with data from the example described there. I can connect to the cluster using the latest version of SQL Workbench/J (Build 122, 2017-02-04) and of the driver (JDBC 4.2–compatible) from an EC2 instance. It fails when I try to create a new user:
create user dbuser25x with password 'abcD1234';
One of these things happens:
I get the message confirming that the user was created, but there is no user:
User dbuser25x created Execution time: 0.04sThe query fails:
An error occurred when executing the SQL command: create user dbuser25x with password 'abcD1234' [Amazon](500310) Invalid operation: user "dbuser25x" already exists; 1 statement failed. Execution time: 0sThe query hangs.
In every situation I use this statement to check the result:
select * from pg_user;
This user is not there and I do not know why.
Another developer tried to create a new user in the same way and got the same problems. I tried solutions from the section There Is a Potential Deadlock of Troubleshooting Queries - they did not help. I used a dedicated Windows EC2 instance on which I installed only SQL Workbench/J to exclude influence of other software - this did not solve the problem.
pg_user, are you able to actually login as that user? - John Rotenstein