DAML on PostgreSQL - DB schema

Hi,

if I run DAML on PostgreSQL is there any database schema which I have to consider or is the Ledger API responsible?

thanks a lot!

Hi @novusopt,
The database schema of DAML on PostgreSQL is purely an implementation detail. You should get all information via the ledger API. Do you have a specific question that you cannot answer via the API?

Hi @cocreature

I have currently discussions with the DB admins & they asked me if there is a schema for the setup of the database. Is my understanding correct, that there is no schema required right?

DAML on PostgreSQL will create the schema itself so you don’t have to create anything outside of it (apart from an empty DB).

There’s a subtlety to point out: DAML on PostgreSQL will not create the database schema itself, but “only” the tables, indices, etc.

@novusopt: The DB admin needs to provide a PostgreSQL schema and a user that has permissions to create tables and indices in that schema.

1 Like

Thanks @cocreature. Is there any documentation regarding what kind of database roles DAML needs in order to setup PostgreSQL properly?

The only important thing is that you use the same user and database when passing the JDBC connection string at startup, everything else is up to you. All you need is a user that has the permissions to fully manage a database.

1 Like

thx @stefanobaghino-da

1 Like

Hi, I am tidying things up on my Canton RPis and are moving from the H2 file storage option to PostgreSQL.

From what I can gather from this thread and other canton postgresql posts that a standard PostgreSQl install, with 1 x Admin & User, no TABLES is the minimum requirement in this case?