Skip to content

[Image Update] postgresql to version 15 #338

Open

Description

@marcindulak

Which image would you like to change?

base

What changes are you requesting?

Update of postgresql, postgresql-devel, postgresql-libs to version 15

What scenario are these changes enabling?

Currently pg tools cannot be used against the latest postgres version 15

pg_dump -Fp -v -h fqdn --port=5432 --username=postgres --dbname=test -f test.dump
pg_dump: error: server version: 15.2; pg_dump version: 14.8
pg_dump: error: aborting because of server version mismatch

By how much does this change change the image size?

Not sure, the size difference depends on the rpm packaging differences between version 14 and 15 of postgres.

Extra information

The cloud shell needs to track the releases of databases, for example at https://learn.microsoft.com/en-us/azure/postgresql/flexible-server/release-notes#release-july-2023 or https://learn.microsoft.com/en-us/azure/mysql/concepts-version-policy, so it always matches the latest Azure GA database version. Are are able to setup a process to make this happen?

Activity

  1. darrentu commented on Aug 30, 2023

    @darrentu
    Contributor

    Hi marcindulak , would you be able to get the package into packages.microsoft.com?

    https://packages.microsoft.com/cbl-mariner/2.0/prod/base/x86_64/Packages/p/
    The only packages available here are with postgres v14

  2. marcindulak commented on Aug 31, 2023

    @marcindulak
    Author

    I'm sorry, but I would rather not work on packaging since I'm not this distribution maintainer.

  3. mbifeld commented on Apr 23, 2025

    @mbifeld
    Member

    Closing as psql v16.7 is now the default in Cloud Shell.

  4. a-matthew commented on Dec 4, 2025

    @a-matthew

    This issue has not been properly resolved. It is still reoccurring to multiple customers.
    Quote: "The cloud shell needs to track the releases of databases, ... so it always matches the latest Azure GA database version. Are are able to setup a process to make this happen?"

    I tested Azure CloudShell with both Bash and PowerShell in December 2025 only to learn that psql is constrained to 16.10, while the newest supported (API and Azure Portal) PostgreSQL on databases is 17.6 (so the backup I have was presumably performed using 'pg_dump' 17.6 by the backend itself, it is an automatic process).

    I am facing a situation where according to the official documentation I can't restore backups of the server due to incompatible psql/pg_restore and sudo-locked down container (Cloudshell) that cannot be upgraded neither through PowerShell cmdlets nor tdnf package manager...

    Performing psql to connect with a remote database gives me a warning:
    WARNING: psql major version 16, server major version 17. Some psql features might not work.
    Performing pg_restore gives me an error:
    pg_restore: error: unsupported versions (1.16) in file header

    The documentation states to use "pg_restore", which is also 16.10.
    I checked the original file with head {filename}.sql, which shows: postgres17.617.6

    I also ran a test 'Hello World' container image with Azure Linux and when manually updating the most recent package (it allows it) it was in fact psql 16.10... Which forces me to not use CloudShell, nor Azure Linux, but instead a self-hosted jump-host distribution of my choice.

    Ref.:
    https://learn.microsoft.com/en-us/azure/backup/restore-azure-database-postgresql-flex

  5. mbifeld commented on Dec 19, 2025

    @mbifeld
    Member

    Thanks for flagging @Matthew0x, reopening issue. Cloud Shell pulls the latest PostgreSQL package from https://packages.microsoft.com/azurelinux/3.0/prod/base/x86_64/Packages/p/. I'll try to look into having the latest PostgreSQL version that is supported by Azure DB be simshipped for Azure Linux. Due to Cloud Shell image release times, there will always be some delay in getting the latest version, but hopefully it'll still improve the situation.

    If Cloud Shell always has the latest PostgreSQL version supported by Azure DB, do you foresee any issues with users whose DBs have older server versions? I assume not as they're backwards compatible, but I just wanted to check. Thank you.

  6. marcindulak commented on Dec 19, 2025

    @marcindulak
    Author

    Newer versions of psql tend to be incompatible with older versions of Postgres. The ideal solution would allow the Azure Cloud Shell user to install any version of psql in Azure Cloud Shell. This is possible by unpacking RPMS under user's home directory, unless the RPMS are too old (coming from an older version of AzureLinux), so having some helper scripts that achieve this, maintained by Azure Cloud Shell could help here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions