0 like 0 dislike
136 views

Please log in or register to answer this question.

1 Answer

0 like 0 dislike
answered by (430 points)  

For example Assume your linux server running 4 postgres cluster so you want to create the postgres user to all cluster use below script to create user with specific privileges.

for K in {5432,5433,5434,5435}
do
psql -U postgres -d postgres -p $K <<DDL
CREATE USER khan IN ROLE role_name connection limit 50;
COMMENT ON ROLE khan IS 'fullname:khan mohammed';
\du+ khan 
DDL
done

 

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
...