# Postgres user: no such user. What user has permissions to create a database?

**URL:** https://forums.percona.com/t/postgres-user-no-such-user-what-user-has-permissions-to-create-a-database/14693
**Category:** Percona Operator for PostgreSQL
**Created:** [March 10, 2022, 10:51am UTC](https://forums.percona.com/t/postgres-user-no-such-user-what-user-has-permissions-to-create-a-database/14693 "2022-03-10T10:51:05Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Michael\_Chudinov](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/michael_chudinov/32/4732_2.png) [@Michael\_Chudinov](https://forums.percona.com/u/Michael_Chudinov)
#### Post date: [March 10, 2022, 10:51am UTC](https://forums.percona.com/t/postgres-user-no-such-user-what-user-has-permissions-to-create-a-database/14693/1 "2022-03-10T10:51:05Z")

</div>

I need a user with priveleges to create new databases in a fresh new installed cluster.  
I use `postgres` user that supposed to be created by Percona operator. Operator version is 1.1.0

```auto
helm install postgresql percona/pg-db --namespace postgre --version "1.1.0"  
export POSTGRES_PASSWORD=$(kubectl -n postgre get secrets postgresql-pg-db-postgres-secret -o jsonpath="{.data.password}" | base64 --decode)
export POSTGRES_USER=$(kubectl -n postgre get secrets postgresql-pg-db-postgres-secret -o jsonpath="{.data.username}" | base64 --decode)

 kubectl run -i --rm --tty percona-client --image=perconalab/percona-distribution-postgresql:13.2 --restart=Never \
  -- psql "postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgresql-pg-db-pgbouncer.postgre.svc.cluster.local/pgdb"

psql: error: FATAL: no such user
pod "percona-client" deleted
pod default/percona-client terminated (Error)

```

The secret for `postgres` user and password is created, but PostgreSQL server has no such user.  
Why? How to fix?

Server has only `pguser` defined, but this one has no permission to create a new database.

---

<div class="post-metadata">

### Author: ![Sergey\_Pronin](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sergey_pronin/32/14887_2.png) [@Sergey\_Pronin](https://forums.percona.com/u/Sergey_Pronin)
#### Post date: [March 22, 2022, 5:39pm UTC](https://forums.percona.com/t/postgres-user-no-such-user-what-user-has-permissions-to-create-a-database/14693/2 "2022-03-22T17:39:16Z")

</div>

For security reasons we do not expose `postgres` user through pgBouncer.  
To connect to it please connect directly to pgPrimary node.

I think we are going to change it in the next release, as seems it is unexpected by lots of users.  
So just connect to `postgresql-pg-db-cluster` service instead of pgBouncer.

---

<div class="post-metadata">

### Author: ![jason123](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@jason123](https://forums.percona.com/u/jason123)
#### Post date: [March 28, 2022, 8:23pm UTC](https://forums.percona.com/t/postgres-user-no-such-user-what-user-has-permissions-to-create-a-database/14693/3 "2022-03-28T20:23:52Z")

</div>

Hi @Sergey_Pronin,

For the release that was release today (March 28), should we now be able to login as postgres through pgbouncer? Thanks.

---

<div class="post-metadata">

### Author: ![Sergey\_Pronin](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/sergey_pronin/32/14887_2.png) [@Sergey\_Pronin](https://forums.percona.com/u/Sergey_Pronin)
#### Post date: [March 29, 2022, 9:32am UTC](https://forums.percona.com/t/postgres-user-no-such-user-what-user-has-permissions-to-create-a-database/14693/4 "2022-03-29T09:32:49Z")

</div>

Hey @jason123 ,

no, it is going to land in 1.3.0 version. Coming in Q2.
