You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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.
Activity
darrentu commentedon Aug 30, 2023
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
marcindulak commentedon Aug 31, 2023
I'm sorry, but I would rather not work on packaging since I'm not this distribution maintainer.
mbifeld commentedon Apr 23, 2025
Closing as psql v16.7 is now the default in Cloud Shell.
a-matthew commentedon Dec 4, 2025
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_restoregives me an error:pg_restore: error: unsupported versions (1.16) in file headerThe documentation states to use "pg_restore", which is also 16.10.
I checked the original file with
head {filename}.sql, which shows:postgres17.617.6I 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
mbifeld commentedon Dec 19, 2025
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.
marcindulak commentedon Dec 19, 2025
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.