I followed this example to setup a custom schema in the db:
SQL_DATABASE=temporal ./temporal-sql-tool --ca search_path=temporal setup-schema -v 0.0
SQL_DATABASE=temporal ./temporal-sql-tool --ca search_path=temporal update -schema-dir schema/postgresql/v96/temporal/versionedSQL_DATABASE=temporalvisibility ./temporal-sql-tool --ca search_path=temporal setup-schema -v 0.0
SQL_DATABASE=temporalvisibility ./temporal-sql-tool --ca search_path=temporal update -schema-dir schema/postgresql/v96/visibility/versioned
The database looks ok once the setup happens. When I try to launch, however, I get errors like this:
temporal-postgresql | 2025-11-12 19:24:43.021 UTC [135] ERROR: relation “schema_version” does not exist at character 26
temporal-postgresql | 2025-11-12 19:24:43.021 UTC [135] STATEMENT: SELECT curr_version from schema_version where version_partition=0 and db_name=$1
It works fine when using the public schema. Does anyone have any suggestions to get it to recognize the other schema? I don’t see an environment variable to specify a schema.