Skip to main content

Core concepts

The core concepts of the PostgreSQL service are described below.

ConceptDescription
Instance groupObject that manages the lifecycle of instances and backups.
InstanceA virtual machine (VM) managed by an instance group. Role is determined as Primary or Standby based on availability.
Instance typeVirtualized hardware resource including vCPU and memory.
- Various types are available to optimize for different workloads.
Instance/Instance group lifecycleEnables users to check and manage the operational and task states based on the lifecycle stages.
BackupManaged online without downtime. Includes creation, deletion, and usage of backups.
VolumeThe database uses block storage volumes.
- Users do not need to manually create or configure block storage.
Network & SecurityProvides logically separated service environments using VPC network and security features.
- All instances are provisioned in a VPC.
IAM & SecurityIAM 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

Image PostgreSQL instance group lifecycle

StatusDescription
PendingPreparing to create the instance group.
- This is the initial state after creation.
ProvisioningCreating instances and configuring required packages.
Primary AvailableAt least one Standby instance is unavailable, but the Primary is operational.
- HA setup remains intact.
SwitchingDuring failover, a new Standby is promoted to Primary.
- Triggered by manual or automatic failover.
AvailableAll instances are running and the group is accessible via endpoint.
- Default ports: 5432 (Primary), 5433 (Standby).
TerminatingDeleting all instances and related resources in the group.
TerminatedAll group resources are deleted.
ErrorTemporary failure in some instances.
FatalIrrecoverable 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

RoleDescription
PrimaryHandles read/write operations.
- Accessed through the group endpoint.
StandbyHA 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 TypevCPUMemory (GiB)
m2a.large28
m2a.xlarge416
m2a.2xlarge832
m2a.4xlarge1664
m2a.8xlarge32128
m2a.12xlarge48192
m2a.16xlarge64256
m2a.24xlarge96384
r2a.large216
r2a.xlarge432
r2a.2xlarge864
r2a.4xlarge16128
r2a.8xlarge32256
r2a.12xlarge48384
r2a.16xlarge64512
r2a.24xlarge96768

Instance lifecycle and status values

Instances start in Pending, proceed through Provisioning and Starting, and finally reach Running.

Image PostgreSQL instance lifecycle

StatusDescription
PendingPreparing to create the instance.
StartingAllocating resources and starting the instance.
RestartingRestart in progress, usually triggered by user.
WarningOperational but with some limitations.
RunningFully operational.
Volume-ExtendingVolume expansion in progress.
TerminatingInstance is being deleted.
TerminatedInstance and resources are deleted.
ErrorService is disrupted due to instance-level failure.
FatalIrrecoverable failure during creation.

Availability and roles

Availability ModeInstance CountDescription
Single1Creates only a Primary instance.
High Availability (HA)Up to 6Creates 1 Primary and 1–5 Standby instances.

Availability status

Availability status indicates replication health in HA mode.

Image PostgreSQL instance availability

StatusDescription
ConfiguringReplication setup in progress.
ConfiguredReplication is functioning normally.
UnavailableReplication has stopped.

Backup

Backups are managed at the instance group level.

Backup lifecycle and status values

Backups go from PendingProcessingAvailable.

Image PostgreSQL backup lifecycle

StatusDescription
PendingBackup request submitted.
ProcessingBackup is in progress.
AvailableBackup is complete and usable.
RestoringBeing used for restore. Cannot delete.
DeletingBackup is being deleted.
DeletedBackup is fully removed.
ErrorBackup failed and is not usable.
FatalBackup 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.

caution

Failover may cause a short service interruption.

Failover status

StatusDescription
SWITCHINGFailover in progress. Service is not available.
PRIMARY-AVAILABLEStandby 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.