Core concepts
The core concepts of the PostgreSQL service are described below.
Concept | Description |
---|---|
Instance group | Object that manages the lifecycle of instances and backups. |
Instance | A virtual machine (VM) managed by an instance group. Role is determined as Primary or Standby based on availability. |
Instance type | Virtualized hardware resource including vCPU and memory. - Various types are available to optimize for different workloads. |
Instance/Instance group lifecycle | Enables users to check and manage the operational and task states based on the lifecycle stages. |
Backup | Managed online without downtime. Includes creation, deletion, and usage of backups. |
Volume | The database uses block storage volumes. - Users do not need to manually create or configure block storage. |
Network & Security | Provides logically separated service environments using VPC network and security features. - All instances are provisioned in a VPC. |
IAM & Security | IAM is used to assign appropriate access roles and securely manage PostgreSQL resources. |
Instance group
An instance group is an object that manages the lifecycle of PostgreSQL instances and backups.
It has various status values, including operational and terminal states, which users can use to monitor and manage the group.
Instance group lifecycle and status values
When you create a PostgreSQL instance group, it starts in the Pending
state, proceeds to Provisioning
and Primary Available
, and finally transitions to the Available
state. At this point, users can access the instance group via the configured endpoint and port. The default ports are 5432
for Primary and 5433
for Standby, but users can specify ports between 1024 and 65535.
Lifecycle diagram
PostgreSQL instance group lifecycle
Status | Description |
---|---|
Pending | Preparing to create the instance group. - This is the initial state after creation. |
Provisioning | Creating instances and configuring required packages. |
Primary Available | At least one Standby instance is unavailable, but the Primary is operational. - HA setup remains intact. |
Switching | During failover, a new Standby is promoted to Primary. - Triggered by manual or automatic failover. |
Available | All instances are running and the group is accessible via endpoint. - Default ports: 5432 (Primary), 5433 (Standby). |
Terminating | Deleting all instances and related resources in the group. |
Terminated | All group resources are deleted. |
Error | Temporary failure in some instances. |
Fatal | Irrecoverable error during setup, such as VM creation failure. |
Instance
An instance is a VM managed by an instance group.
PostgreSQL instances are virtualized environments including CPU and memory. Each instance has a defined role and status.
Instance roles
Role | Description |
---|---|
Primary | Handles read/write operations. - Accessed through the group endpoint. |
Standby | HA standby instance that also serves as a read replica. - Created only when HA is selected. |
Instance types
Select instance types based on your workload requirements. Each type offers different compute resources, and billing is based on usage.
Supported types: m2a (general-purpose), r2a (memory-optimized)
Instance Type | vCPU | Memory (GiB) |
---|---|---|
m2a.large | 2 | 8 |
m2a.xlarge | 4 | 16 |
m2a.2xlarge | 8 | 32 |
m2a.4xlarge | 16 | 64 |
m2a.8xlarge | 32 | 128 |
m2a.12xlarge | 48 | 192 |
m2a.16xlarge | 64 | 256 |
m2a.24xlarge | 96 | 384 |
r2a.large | 2 | 16 |
r2a.xlarge | 4 | 32 |
r2a.2xlarge | 8 | 64 |
r2a.4xlarge | 16 | 128 |
r2a.8xlarge | 32 | 256 |
r2a.12xlarge | 48 | 384 |
r2a.16xlarge | 64 | 512 |
r2a.24xlarge | 96 | 768 |
Instance lifecycle and status values
Instances start in Pending
, proceed through Provisioning
and Starting
, and finally reach Running
.
PostgreSQL instance lifecycle
Status | Description |
---|---|
Pending | Preparing to create the instance. |
Starting | Allocating resources and starting the instance. |
Restarting | Restart in progress, usually triggered by user. |
Warning | Operational but with some limitations. |
Running | Fully operational. |
Volume-Extending | Volume expansion in progress. |
Terminating | Instance is being deleted. |
Terminated | Instance and resources are deleted. |
Error | Service is disrupted due to instance-level failure. |
Fatal | Irrecoverable failure during creation. |
Availability and roles
Availability Mode | Instance Count | Description |
---|---|---|
Single | 1 | Creates only a Primary instance. |
High Availability (HA) | Up to 6 | Creates 1 Primary and 1–5 Standby instances. |
Availability status
Availability status indicates replication health in HA mode.
PostgreSQL instance availability
Status | Description |
---|---|
Configuring | Replication setup in progress. |
Configured | Replication is functioning normally. |
Unavailable | Replication has stopped. |
Backup
Backups are managed at the instance group level.
Backup lifecycle and status values
Backups go from Pending
→ Processing
→ Available
.
PostgreSQL backup lifecycle
Status | Description |
---|---|
Pending | Backup request submitted. |
Processing | Backup is in progress. |
Available | Backup is complete and usable. |
Restoring | Being used for restore. Cannot delete. |
Deleting | Backup is being deleted. |
Deleted | Backup is fully removed. |
Error | Backup failed and is not usable. |
Fatal | Backup creation failed completely. |
Failover
PostgreSQL supports high availability with failover. If a failure occurs, failover promotes a Standby instance to Primary. Both automatic and manual failover are supported.
Failover may cause a short service interruption.
Failover status
Status | Description |
---|---|
SWITCHING | Failover in progress. Service is not available. |
PRIMARY-AVAILABLE | Standby configuration is in progress. |
Volume
Uses block storage volumes for PostgreSQL data. No user configuration required.
Network and security
All PostgreSQL instances operate in a VPC. Use VPC features to isolate and secure environments based on your network requirements.