Docs

Postgres behavior and limits

A Postgres database is standard PostgreSQL on a private network, with automated backups on the clouds. Its guarantees and limits hold on every platform; sizing and the changes an existing database accepts differ per cloud.

Guarantees

Standard PostgreSQL. Every platform runs PostgreSQL over the standard wire protocol, with transactions, the full SQL language, and your own driver or ORM. Alien creates the database and resolves how to connect. It doesn't wrap or restrict SQL.

Private network only. On AWS, GCP, and Azure the database has no public IP, and there is no option to expose it. Only workloads in the same deployment can reach port 5432.

Local listens on localhost only. On Kubernetes and Machines the customer provides the database and controls its networking.

Extensions. On the clouds and Local, vector (pgvector), pg_trgm, uuid-ossp, and pgcrypto are available through CREATE EXTENSION.

  • Each cloud ships its own pgvector build, so the minor version follows the provider.
  • Local installs pgvector 0.8.1, built and hosted by Alien.
  • On Kubernetes, extensions depend on the database the customer provides.

Automated backups on the clouds. AWS and Azure keep automated backups for 7 days. GCP enables automated backups and point-in-time recovery with Cloud SQL's default retention. Local has no backups.

Limits

LimitValueNotes
Engine version15, 16, 17Default 17. See Changing a database.
StorageDefault 20Gi, grow-onlyShrinking is rejected. Azure raises anything below 32 GiB to 32 GiB. On Azure, use one of its fixed sizes (32, 64, 128 GiB, and so on); Alien passes the size through unchanged.
Largest sizeGCP 16 vCPU / 60 GiB, Azure 8 vCPU / 32 GiB, AWS 256 ACUOn GCP and Azure, larger requests fail instead of being capped. On AWS, the maximum is capped at 256 ACU.
Backup retention7 days on AWS and AzureCloud SQL default on GCP. None on Local.
Resource IDUsed as the cluster, instance, or server nameKeep it short and lowercase.

Sizing on each cloud

cpu and memory are sizing hints. Each cloud applies them differently.

AWS

Aurora Serverless v2 bills and scales in Aurora Capacity Units (ACUs).

  • Minimum: 0 ACU, so the cluster pauses when idle.
  • Maximum: derived from memory at 1 ACU per 2 GiB, rounded up to the next 0.5 ACU and kept between 1 and 256 ACU. Anything up to 2Gi gives 1 ACU.
  • Without memory: the maximum is 2 ACU.
  • cpu isn't used.

GCP

Cloud SQL Enterprise edition. Alien picks the smallest custom tier that fits both cpu and memory:

TiervCPUMemory
db-custom-1-3840 (default)13.75 GiB
db-custom-2-768027.5 GiB
db-custom-4-15360415 GiB
db-custom-8-30720830 GiB
db-custom-16-614401660 GiB

Azure

Flexible Server. Alien picks the smallest SKU that fits both cpu and memory:

SKUTiervCPUMemory
Standard_B1ms (default)Burstable12 GiB
Standard_B2sBurstable24 GiB
Standard_D4ds_v5General Purpose416 GiB
Standard_D8ds_v5General Purpose832 GiB

High availability

PlatformWhat .highAvailability() does
AWSNothing. The Aurora cluster has one writer instance either way.
GCPRegional availability: a standby in another zone with automatic failover.
AzureZone-redundant high availability: a standby server in another zone.

Changing a database

ChangeWhat happens
cpu or memoryResized in place. AWS changes the ACU ceiling, GCP changes the Cloud SQL tier, and Azure changes the SKU. Data is kept. GCP and Azure restart the server briefly.
storage upGrown in place.
storage downRejected.
version downRejected.
version upRejected by the controller on AWS, GCP, and Local. A major upgrade is hard to reverse, and Alien doesn't take a backup first. To move versions, create a new Postgres resource and migrate the data.
encryptionKeyCan't change after the database exists.

On Local, cpu and memory have no effect.

Lifecycle

Frozen or live. When frozen, the setup template (CloudFormation or Terraform) creates the database during initial setup, and Alien imports and monitors it. When live, Alien creates, updates, and deletes it.

Deletion removes the data. Deleting the resource deletes the database with no final snapshot, on every cloud and in every setup template. Export the data first if you need it.

Passwords. On the clouds, Alien generates the administrator password and stores it in the cloud's secret store: Secrets Manager, Secret Manager, or Key Vault. The binding never contains the password, only where to read it.

Customer-managed keys. On AWS, .encryptionKey(key) encrypts storage, snapshots, and Performance Insights data with the customer's Key.

If the customer revokes the key, Aurora stops serving the database. Alien marks the key unavailable and doesn't replace the database. When access comes back, postgres/key-recovery lets Alien restart the cluster.

Platform notes

AWS

Aurora Serverless v2 pauses when idle, and you pay for storage only while paused. The first connection after a pause waits about 15 seconds while it resumes, longer after long idle periods.

Use a connect timeout of at least 30 seconds, retry connects, and keep health checks off the database so it can pause.

The cluster sits in a DB subnet group in the deployment's network, with its own security group that allows port 5432 only from the stack.

GCP

Cloud SQL instances are always on: there's no scale-to-zero. Workloads reach the instance through a Private Service Connect endpoint in the deployment's network.

Clients dial the endpoint's IP, which isn't in Cloud SQL's certificate, so the binding uses verify-ca instead of verify-full.

Azure

Flexible Server instances are always on. Workloads reach the server through a private endpoint in the deployment's network, resolved through the privatelink.postgres.database.azure.com private DNS zone. Alien allow-lists the four extensions above with the azure.extensions server parameter.

Kubernetes and Machines

Alien doesn't create Postgres on Kubernetes or Machines. The customer provides a database, and Alien passes it to your workloads as an external binding with service: "external".

On Machines the resource must be "frozen". Networking, extensions, and backups depend on that database.

Local

A native PostgreSQL process from embedded binaries, no Docker needed.

  • The data directory persists across restarts.
  • Alien restarts the process if it exits, and restarts recorded databases when the CLI starts.

On this page