> ## Documentation Index
> Fetch the complete documentation index at: https://anaconda.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Upgrading Postgres version

noindex: true

Current versions of Workbench no longer support Postgres versions 9.6 and older. To align with these changes, you must update your Postgres to a supported version. To simplify this process, Anaconda provides a script that automates the update, minimizing downtime and ensuring a smooth transition. See which Postgres versions are compatible with your version of Workbench in the latest [release notes](../../reference/release).

## Checking your Postgres version

You can check your current version of Postgres by running the following command in your cluster:

<Tabs>
  <Tab title="BYOK8s">
    ```sh theme={null}
     # Replace <NAMESPACE> with your namespace (default is anaconda-enterprise)
     kubectl exec -it anaconda-enterprise-postgres-0 -n <NAMESPACE> -- psql --version
    ```
  </Tab>

  <Tab title="Gravity">
    ```sh theme={null}
     kubectl exec -it anaconda-enterprise-postgres-0 -- psql --version
    ```
  </Tab>
</Tabs>

## Upgrading Postgres

You must place a compatible version of Postgres in the same registry as the current Postgres image prior to performing the upgrade.

<Warning>
  If you are upgrading your Workbench version, complete that process first, then return here.
</Warning>

1. [Create a backup of your cluster](/docs/data-science/5.8.1/install/migrate/backup-restore#run-the-backup-script).
2. Pause your instance of Workbench by running the following command:

   ```
   ae_pause.sh
   ```
3. Use the restore script to update your version of Postgres to a compatible version by running the following command:

   ```sh theme={null}
    # Replace <VERSION> with the new Postgres version image number
    bash ae_restore.sh ae5_config_db_YYYYMMDDHHMM.tar.gz ae5_data_YYYYMMDDHHMM.tar.gz --db-version=<VERSION>
   ```
4. Unpause your instance of Workbench by running the following command:

   ```
   ae_unpause.sh
   ```
