Changing Plan of a Scalingo for PostgreSQL® Dedicated Resources Database
At Scalingo, all databases plans are identified using a name made of two or three parts separated by a dash (-). This name is made of:
- a database type :
postgresql - a class : either
starter,businessorenterprise(learn more about service classes) - a size : specifying the amount of RAM available with the plan, in MB.
You can change your Scalingo for PostgreSQL® Dedicated Resources Database plan whenever you want. The operation is launched instantly, no manual input is required.
Service class changes are supported in both directions (scale-out or scale-in) for a given size. However, size/resources changes are supported only in a scale-up direction: moving to a smaller size is not supported.
The impact on your application and the downtime vary depending on several factors such as the current plan being used and the one you wish to change for (see below for further information).
Understanding the Plan Change Process
Plan changes can combine two dimensions:
- Topology:
-
Single-node (
Starter) -
Multi-node cluster (
BusinessandEnterprise)
-
Single-node (
- Size (RAM per node)
Single-node to Single-node (Scale-up)
This covers Starter to Starter when increasing size. The platform reboots
the existing instance with the new size.
| From topology | To topology | To size | Downtime | Typical duration |
|---|---|---|---|---|
Single-node (Starter) |
Single-node (Starter) |
Larger only | Yes | ~15 minutes |
Single-node to Multi-node Cluster (Scale-out)
This covers moves from Starter to Business or Enterprise. The platform
creates additional node(s) and configures replication/failover.
| From topology | To topology | To size | Downtime | Typical duration |
|---|---|---|---|---|
Single-node (Starter) |
Multi-node (Business/Enterprise) |
Same or Larger | No | ~15 minutes |
Multi-node Cluster to Multi-node Cluster
This covers Business <-> Enterprise, as well as size increases within the
same class.
| From topology | To topology | To size | Downtime | Typical duration |
|---|---|---|---|---|
Multi-node (Business/Enterprise) |
Multi-node (Business/Enterprise) |
Same or Larger | No | ~15 minutes |
Multi-node Cluster to Single-node (Scale-in)
This covers moves from Business or Enterprise to Starter.
| From topology | To topology | To size | Downtime | Typical duration |
|---|---|---|---|---|
Multi-node (Business/Enterprise) |
Single-node (Starter) |
Same | No | ~2-3 minutes |
Multi-node (Business/Enterprise) |
Single-node (Starter) |
Larger | Yes | ~15 minutes |
Multi-node (Business/Enterprise) |
Single-node (Starter) |
Smaller | Not supported | N/A |
Using the Dashboard
- From your web browser, open your dashboard
- Click on the Settings tab
- Locate the Database plan block and click on the Change plan button
- Select the new plan
- Click the Finish button
- Validate by clicking the Confirm plan change button
Using the Command Line (Preview)
Because Dedicated Resources databases are not yet generally available, you must first enable preview features to use the related CLI commands:
export SCALINGO_PREVIEW_FEATURES=true
- Make sure you have correctly setup the Scalingo command line tool
- From the command line, list your databases:
scalingo databases - Locate the
IDof the database you want to scale (for examplemy-dedicated-database). - From the command line, list the plans available for
postgresql-ng:scalingo database-list-plans postgresql-ngThe output should look like this:
┌─────────────────────────────────┬─────────────────┐ │ ID │ NAME │ ├─────────────────────────────────┼─────────────────┤ │ postgresql-dr-starter-4096 │ Starter 4G │ │ postgresql-dr-starter-8192 │ Starter 8G │ │ postgresql-dr-starter-16384 │ Starter 16G │ ... - Locate the
IDcorresponding to the plan you want to scale to (for examplepostgresql-dr-starter-8192) - Change plan with:
scalingo database-upgrade <database_ID> <plan_ID>Example:
scalingo database-upgrade 699d6312565f770d0a6cdab3 postgresql-dr-starter-8192The output should look like this:
-----> Your postgresql-ng database 699d6312565f770d0a6cdab3 ('my-dedicated-database') is being upgraded…
Optionally you can use --wait in order to make the command synchronous.
scalingo database-upgrade --database 699d6312565f770d0a6cdab3 --wait postgresql-dr-starter-8192
Using the Terraform Provider
- Update the
planproperty of the corresponding Resource block in your Terraform file to scale the database:resource "scalingo_database" "my-dedicated-database" { name = "my-dedicated-database" technology = "postgresql-ng" plan = "postgresql-dr-starter-8192" }In this example, we switch the
my-dedicated-databaseresource to a dedicated PostgreSQL Starter 8192 database. - Run
terraform planand check if the result looks good - If so, run
terraform apply