Upgrading PostgreSQL Version for Self-Hosted Spacelift
Last updated: September 9, 2025
When upgrading your self-hosted Spacelift installation, you may need to update your PostgreSQL version to meet current requirements. This article explains how to handle PostgreSQL version upgrades in both CloudFormation and Terraform deployments.
PostgreSQL Version Requirements
Spacelift requires PostgreSQL 14 or higher for self-hosted installations. While earlier versions may work, we recommend using PostgreSQL 16.x as this is the version we test against internally.
Updating PostgreSQL Version in CloudFormation
To update your PostgreSQL version in CloudFormation, you'll need to modify two sections in your infra-db.yaml template:
Update the engine version parameter:
DBPostgresEngineVersion: Type: String Default: "14.15" Description: The Aurora Postgres Engine Version to useCreate a new parameter group with the correct family:
DBClusterParameterGroup: Type: AWS::RDS::DBClusterParameterGroup DeletionPolicy: Retain Properties: DBClusterParameterGroupName: spacelift14 # Use a new name when upgrading Description: Spacelift core product database Family: aurora-postgresql14 Parameters: statement_timeout: "120000"
Important: When upgrading the parameter group, you must use a new parameter group name as CloudFormation cannot modify existing parameter groups.
Updating PostgreSQL Version in Terraform
If using the official Terraform AWS module for self-hosted Spacelift, you can specify the PostgreSQL version through the postgres_version variable. The module defaults to version 16.6.
Best Practices
Always backup your database before performing version upgrades
Test the upgrade in a non-production environment first if possible
Schedule upgrades during maintenance windows
Use the latest minor version within your chosen major version for security updates
For the most up-to-date PostgreSQL compatibility information, refer to our external dependencies documentation.