Can`t connect ti server from new user in PostgreSQL #331
-
Good day, Vitaliy. And after creating a cluster, I create in pgAdmin a new database and a user for this database, but after the user is created in terminal mode, I cannot connect to it from the outside with the command: |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 10 replies
-
Hello @vasilytray Most likely you are using pgbouncer before Postgres as the default schema suggests.
or
|
Beta Was this translation helpful? Give feedback.
-
Didn't notice right away, are you connecting directly to postgres? try removing the -w (--no-password) option |
Beta Was this translation helpful? Give feedback.
-
Good day, Vitaliy. |
Beta Was this translation helpful? Give feedback.
-
And one more problem, I add a new user to the main.yml run:
What's wrong? |
Beta Was this translation helpful? Give feedback.
-
You can define a user in variables and create it using ansible, or you can create a user yourself using sql. But in any case, it is necessary to update the pgbouncer configuration after adding a new user (or changing the password). |
Beta Was this translation helpful? Give feedback.
-
Question 1: How to track that a user has been added to the product to launch |
Beta Was this translation helpful? Give feedback.
-
Question 2 . If the node on which it is located falls in the cluster |
Beta Was this translation helpful? Give feedback.
@vasilytray here at your discretion
it can also be a metric in the monitoring system.
But if you create database users often enough, it may be better to use
auth_query
instead of a file with a list of usersauth_file
.example: https://www.enterprisedb.com/postgres-tutorials/pgbouncer-authquery-and-authuser-pro-tips