Hi all, we configure the postgresql database as f...
# flyte-support
s
Hi all, we configure the postgresql database as follows:
Copy code
configuration:
            database:
                username: postgres
                host: postgres.flyte.svc.cluster.local
                dbname: flyteadmin
Is it also possible to configure the schema? Currently the schema "public" is used (the default schema of postgreSQL). Since we are sharing the database with other applications it would be good to have the flyte-related tables in a separate schema - is this possible? Thanks!
f
You can use logical databases
👍 1
s
Thanks @freezing-airport-6809 !
@freezing-airport-6809 Can you elaborate a little bit? Not very familiar with logical databases. But I think actually the problem seems to be solved - we can create our own database on the server, so can use a dedicated one for flyte..
f
i just meant you can create more than one database per instance right? https://www.postgresql.org/docs/current/managing-databases.html Its like a schema, but actually a new database - so no need to add the schema qualifier to every query
h
@shy-guitar-84777, we use gorm under the covers to connect to postgres and according to https://stackoverflow.com/questions/54203807/how-set-a-specifc-database-schema-with-gorm we can set schema by providing
NamingStrategy
to the gorm config (which we do in Flyte in https://github.com/flyteorg/flyte/blob/ef27b291deaf080ccc45df7fd71c66bb44d508a6/flytestdlib/database/db.go#L22-L25). Can you open a github issue to track this change?