cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CAP - BTP - PostgreSQL multiple databases

kevin_balboni1
Explorer

Ddear community,

I'm looking if there is a possibility to share the PostgreSQL service between multiple spaces within Cloud Foundry.

My goal is to have a single instance of PostgreSQL and deploy the various service databases that run in separate spaces.

It's possible? Do you have any suggestions/guidance?

View Entire Topic
Dinu
Contributor
0 Kudos

Try command `cf share-service` it should be possible to share the service at least between spaces in the same org and possibly between spaces of other orgs in the same DC.

$ cf share-service SERVICE-INSTANCE -s OTHER-SPACE [-o OTHER-ORG]
kevin_balboni1
Explorer
0 Kudos

Hi @Dinu

Sorry for my late reply.

I managed to share the PostgreSQL instance with multiple spaces, however in this way the db data is also shared between the various services that connect.
My need is to use the same PostgreSQL instance between multiple spaces but internally activating multiple databases/schemas, in this way I would share the service instance but not the internal data.

On HANA it is possible to do this using hdi-containers, is there an equivalent solution for PostgreSQL?

Dinu
Contributor
0 Kudos
No. There is no database container infrastructure available for postgreSQL from SAP.
kevin_balboni1
Explorer
0 Kudos
However, there is the possibility of having multiple databases within the same PostgreSQL instance, I just need to find a way to manage it on the BTP. It seems strange to me that SAP didn't think about this case.
Dinu
Contributor
0 Kudos
You can connect to the DB and create databases and users yourself. You can use any tool, psql for example. This is shown in https://help.sap.com/docs/postgresql-hyperscaler-option/postgresql-on-sap-btp-hyperscaler-option/exp...