cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP CAP - BTP - PostgreSQL multiple databases

kevin_balboni1
Participant
2,330

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?

Accepted Solutions (1)

Accepted Solutions (1)

kevin_balboni1
Participant
0 Likes

In SAP BTP is not possibile to manage multiple databases/schemas using PostgreSQL 

Answers (1)

Answers (1)

Dinu
Active Contributor
0 Likes

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
Participant
0 Likes

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
Active Contributor
0 Likes
No. There is no database container infrastructure available for postgreSQL from SAP.
kevin_balboni1
Participant
0 Likes
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
Active Contributor
0 Likes
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...
MMonis
Participant
0 Likes
Hi @kevin_balboni1, Were you able to get this to work ?
kevin_balboni1
Participant
0 Likes
Hi @MMonis,
kevin_balboni1
Participant
0 Likes
Hi @MMonis, No, I wasn't able to. I decided to abandon this path in favor of SAP HANA.