skip to Main Content

I created a postgres cluster with patroni. The schemas are common in all the databases. Any table created in a schema of one database, appears also in the same schema of all other databases.
Creating a new schema in one database, creates the same schema in all other databases.
Postgres version is 12.15 running on Oracle Linux 8.
Is this a setting that I can turn off in order to separate the databases?
I’m creating schemas and databases using pgAdmin4 7.1, I don’t have experience with psql

The setup instructions I followed came from here https://www.techsupportpk.com/2020/02/how-to-create-highly-available-postgresql-cluster-centos-rhel-8.html
I re-installed from scratch and the behavior is the same

2

Answers


  1. Chosen as BEST ANSWER

    The error was in my pgbouncer configuration. In the databases section I had

    * = host=192.168.10.1 port=5432 dbname=postgres
    

    The correct configuration must have a different entry for each database, without the wildcard

    postgres = host=192.168.10.1 port=5432 dbname=postgres
    analytics = host=192.168.10.1 port=5432 dbname=analytics
    

  2. Patroni uses PostgreSQL streaming replication, which keeps the standby server a faithful physical copy of the primary. So there is no way to avoid that if you create a table in a certain schema on the primary, that table will also be created in the same schema on the standby.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search