Temporal service one single database

Hi, since we are restricted to have one single database, can I config the temporal service to use multiple schema within one database rather than multiple database? Thanks.

What exactly are you trying to achieve?

Since temporal require two database temporal and temporal visibility, we would like to put these two database to one database but with different schema for postgre and maintain only one database. Therefore, we are wondering if this is any way to do this.

I’m not aware of anyone running visibility and temporal visibility in different databases. Everyone creates them in the same one. The only exception is when ElasticSearch is used for visibility instead of the Cassandra/MySQL/PostreSQL.

Thanks for your prompt response, but we would like to know if it is possible to not separate visibility and default database. Here is my example config, we are trying to set as below. Is it possible to do so? Besides, we are wondering why the visibility and the default database are separated.

 persistence:
  default:
    driver: "sql"

    sql:
      driver: "postgres"
      host: "localhost"
      port: 5432
      **database: temporal**
      user: "postgres"
      password: "postgres"
      existingSecret: ""
      secretName: ""
      maxConns: 20
      maxConnLifetime: "1h"

  visibility:
    driver: "sql"

    sql:
      driver: "postgres"
      host: "localhost"
      port: 5432
      **database: temporal**
      user: "postgres"
      password: "postgres"
      existingSecret: ""
      secretName: ""
      maxConns: 20
      maxConnLifetime: "1h"

Their schemas are separated for easier maintenance and to ensure that they are independent. You can create both schemas in the same physical database.