Postgres schema

Hi,
We are using a customized schema instead of ‘public’ in postgres, does temporal-sql-tool support to pass a schema param? I believe even i am able to create tables in my own schema, the temporal services will not able to access, right?

You should be able to do that, if you run:

./temporal-sql-tool setup-schema -h

it does show option:

--schema-file value, -f value path to the .sql schema file; if un-specified, will just setup versioning tables

i didnt mean the table schema, i meant the schema namespace in postgres

I don’t see a specific option for that, feel free to open an issues here, and add details on what should be added please.

@Newbie_Sr did you manage to set up the database in a different schema? I am facing this issue now and it would be very helpful if you could share your findings here :slight_smile:

added the flag --ca search_path=<custom_schema> and it worked.

Hi Adam,

Can you share what exactly you did? I am trying to set schema name using the tool but I am not successful.

created enachment request Schema name selection for postgres.

I shared exactly what I did there. I added that flag and the sql tool initialized the database in that schema.

Thank you, I was able to install the tables in this specified schema. But how did you configure temporal to use that schema?

I created a schema called temporal, but when a temporal request reaches Postgres it is looking table in the public schema. did you do any specific configuration in temporal to use that specific schema?

I fixed the issue, I added the attribute in the config_template.yaml file as an env variable.

connectAttributes:
search_path:“schema_name”

By default, this value is not present in the config file.