Postgres reference ¶

Preview

Postgres is in preview. Use it with care; the API and supported workflows may change. See the Postgres overview for current availability.

This document describes the configuration values in the Postgres spec, commonly known as the postgres.yaml file. Each Postgres starts with a branch named main. spec.activeBranch selects the branch for workloads without an explicit uses.postgres[].branch; status.activeBranch reports the branch that is active now. Switching branches is not instant. See Postgres branches for the branch model.

activeBranch ¶

ActiveBranch selects the local branch name within this Postgres for normal workloads. When omitted, pgrator retains the current active branch.

Type: string
Required: false

Example

yaml

extensions ¶

Extensions to enable in the Postgres database. See available extensions for names included in the PostgreSQL image.

Type: array
Required: false

Example

yaml

extensions[].name ¶

Name of the Postgres extension to enable.

Type: string
Required: true

Example

yaml

highAvailability ¶

HighAvailability adds a third instance and enables synchronous replication.

A cluster always runs a primary and a standby, so failover is available either way. What this adds is the guarantee that an acknowledged commit survives losing the primary, at the cost of write latency.

Type: boolean
Required: false

Example

yaml

majorVersion ¶

MajorVersion of Postgres to use. Only PostgreSQL 18 is available in preview. The schema also accepts 16 and 17, but the platform image catalog does not provide those versions.

Type: enum
Required: true
Allowed values: 16, 17, 18

Example

yaml

resources ¶

Resources configures compute and disk for the Postgres cluster.

Type: object
Required: false

Example

yaml

resources.cpu ¶

Cpu is the CPU resources for the Postgres cluster. Use CPU cores or millicores: 1 is one core, 500m is half a core, and 100m is one tenth of a core.

Type: integer or string
Required: false

Validation pattern

regex

Example

yaml

resources.diskSize ¶

DiskSize is the disk size for the Postgres cluster. Use a Kubernetes quantity, for example 10Gi (10 gibibytes) or 100Gi. Disk size can only increase.

Type: integer or string
Required: false

Validation pattern

regex

Example

yaml

resources.memory ¶

Memory is the memory resources for the Postgres cluster. Use a Kubernetes quantity, for example 512Mi (512 mebibytes) or 1Gi (1 gibibyte).

Type: integer or string
Required: false

Validation pattern

regex

Example

yaml