IBM Cloud Docs
Adding PostgreSQL members

Adding PostgreSQL members

By adding more members, it's possible to scale your IBM Cloud® Databases for PostgreSQL deployment horizontally, which increases deployment reliability by spreading data across extra Availability zones, where available. Horizontally scaling deployments to three PostgreSQL members is required before enabling synchronous replication. Adding a member does not spread loads nor help with capacity in your deployment; however, PostgreSQL members are eligible for failovers.

Horizontal scaling can increase only disk and memory allotments. Members cannot be scaled down.

Members that you add to your deployment are added with the amount of disk, memory, and CPU as the other members currently in your deployment. A visual representation of your data members and their resource allocation is available on the Resources tab of your deployment's Manage page. However, horizontal scaling is only available by using the API.

Databases for PostgreSQL deployments have two data members in a cluster, and resources are allocated to both members equally. For example, the minimum storage of a PostgreSQL deployment is 10240 MB, which equates to an initial size of 5120 MB per member. The minimum RAM for a PostgreSQL deployment is 8192 MB, which equates to an initial allocation of 4096 MB per member.

Billing is based on the total amount of resources that are allocated to the service.

Adding members through the API

The Foundation Endpoint that is shown in the Overview of your service provides the base URL to access this deployment through the API.

To view the current and scalable resources on a deployment, use the /deployments/{id}/groups endpoint.

curl -X GET https://api.{region}.databases.cloud.ibm.com/v5/ibm/deployments/{id}/groups -H 'Authorization: Bearer <>' \

To add members, use the /deployments/{id}/groups/{group_id} endpoint. This endpoint sends a PATCH request with the number of members that you want in your deployment. The following example request increases the number of members from the default of 2 to 3.

A 2-member deployment can be scaled only up to a 3-member instance.

curl -X PATCH https://api.{region}.databases.cloud.ibm.com/v5/ibm/deployments/{id}/groups/{group_id} 
-H 'Authorization: Bearer <>' 
-H 'Content-Type: application/json' 
-d '{"members": {"allocation_count": 3}}' \