Skip to main content

CloudNativePG Recipe 8: Participating in PostgreSQL 17 Testing Program in Kubernetes

Join the PostgreSQL 17 testing program using Kubernetes and CloudNativePG! With the recent release of PostgreSQL 17 Beta 1, our community has made operand container images available for testing. This article guides you through deploying a PostgreSQL 17 cluster, selecting specific Debian versions, and verifying installations. Perfect for developers in early stages, your participation will help identify and fix bugs before the final release. Get involved and ensure PostgreSQL 17 is robust and ready for production, even in Kubernetes!

… or thanks to Kubernetes! ;)


The PostgreSQL Global Development Group (PGDG) recently released PostgreSQL 17 Beta 1, offering a preview of all the features that will be available when PostgreSQL 17 is officially launched later this year (see the release notes).

If you’re interested in trying CloudNativePG on your laptop, follow “CNPG Recipe #1 - Setting Up Your Local Playground in Minutes” and adjust the image name in the cluster definition as described in the rest of this article.

My personal recommendation goes to all application developers who are now at the early stage of their application development process and planning to go into production sometime next year: start using PostgreSQL 17 in your tests now.

Container Images #

As part of the CloudNativePG community, we have made operand container images for PostgreSQL 17 Beta 1 available in our official postgres-container image registry. These images, tagged with ‘17beta1’ or ‘17’, are specifically designed for use with the CloudNativePG operator and are not intended for production environments.

To select a specific Debian version, use the -NAME suffix, where NAME is either:

For instance, to run PostgreSQL 17 Beta 1 on Debian 12, you would use the image tag ghcr.io/cloudnative-pg/postgresql:17beta1-bookworm.

Currently, these images do not include the pgaudit and pg_failover_slots extensions, as the necessary packages for PostgreSQL 17 are not yet available.

We invite you to join us in testing the new features of PostgreSQL 17 with CloudNativePG. Your participation will help us identify and fix bugs in PostgreSQL before its final release.

Specifically, since each new PostgreSQL version comes with performance improvements, I am very interested in running the same benchmarks that I presented at KubeCon EU in Paris a few months ago on PostgreSQL 17.

Example #

Below is a quick example of a 3-instance PostgreSQL 17 ‘Cluster’ manifest for deployment in your Kubernetes cluster:

apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
  name: pg17
spec:
  imageName: ghcr.io/cloudnative-pg/postgresql:17beta1-bookworm
  instances: 3
  storage:
    size: 1Gi

After deploying, you can verify the version with the following command:

kubectl exec -ti pg17-1 -c postgres -- psql -qAt -c 'SELECT version()'

This should return:

PostgreSQL 17beta1 (Debian 17~beta1-1.pgdg120+1) on x86_64-pc-linux-gnu,
  compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit

Conclusion #

In the coming weeks, more beta versions and at least one release candidate version will be published by the PGDG. It goes without saying that we should all use the latest pre-release version when testing (beta1 at the time of writing this article).

While PostgreSQL 17 can be run in CloudNativePG, we are actively working on integrating some of the new features introduced in PostgreSQL 17 into CloudNativePG. These enhancements are targeted for inclusion in versions 1.24 and 1.25, which will offer official support once PostgreSQL 17 is in production.

Join me and the rest of the PostgreSQL Community in this testing program to ensure PostgreSQL 17 is robust and ready for its official release! Thank you!