Overview

ParadeDB ships its functionality inside a Postgres extension, pg_search. Upgrading ParadeDB is as simple as updating the pg_search extension.

ParadeDB uses pgvector for vector search. This extension is not managed by ParadeDB. Please refer to the pgvector documentation for instructions on how to upgrade it.

Getting the Current Version

To inspect the current version of an extension, run the following command.

SELECT extversion FROM pg_extension WHERE extname = 'pg_search';

Verify that it matches paradedb.version_info():

SELECT * FROM paradedb.version_info();

The reason that there are two statements is because paradedb.version_info() is the actual version of pg_search that is installed, whereas pg_extension is what Postgres’ catalog thinks the version of the extension is.

If paradedb.version_info() is greater than pg_extension, it typically means that ALTER EXTENSION was not run after the previous upgrade, and that the SQL upgrade scripts were not applied. If pg_extension is greater than paradedb.version_info(), it means that the extension didn’t fully upgrade, and that Postgres needs to be restarted.

Getting the Latest Version

The latest version of pg_search is 0.15.18. Please refer to the releases page for all available versions of pg_search.

Updating ParadeDB

Helm Chart

To upgrade the ParadeDB Helm chart:

  1. Update the paradedb chart to the latest version.
helm repo update
  1. Get the latest version of the paradedb chart.
helm search repo paradedb
  1. Get the latest version of the ParadeDB extension, which is the value of version.paradedb in the chart README.

  2. Run helm upgrade with the latest version of the chart and the latest version of the extension.

helm upgrade paradedb paradedb/paradedb --namespace paradedb --reuse-values --version <helm_version> --set version.paradedb=<paradedb_version> --atomic

Replace <helm_version> with the latest version of the chart and <paradedb_version> with the latest version of the extension.

  1. If you are using ParadeDB BYOC, an automatic rollout will begin. One by one, the pods will be restarted to apply the new version of the extension.

Docker Image

To upgrade the ParadeDB Docker image while preserving your data volume:

  1. Stop the ParadeDB Docker image via docker stop paradedb.

  2. Run the following command to pull a specific version of the Docker image. You can set the version number to latest to pull the latest Docker image. You can find the full list of available tags on Docker Hub.

docker pull paradedb/paradedb:0.15.18

The latest version of the Docker image should be 0.15.18.

  1. Start the new ParadeDB Docker image via docker run paradedb.

Self-Managed Postgres

To upgrade the extensions running in a self-managed Postgres:

  1. Stop Postgres (e.g. pg_ctl stop -D </path/to/data/directory>).
  2. Download and install the extension you wish to upgrade in the same way that it was initially installed.
  3. Start Postgres (e.g. pg_ctl start -D </path/to/data/directory>).

Alter Extension

After ParadeDB has been upgraded, connect to it and run the following command in all databases that pg_search is installed in. This step is required regardless of the environment that ParadeDB is installed in (Helm, Docker, or self-managed Postgres).

ALTER EXTENSION pg_search UPDATE TO '0.15.18';

Verify the Upgrade

After upgrading the extension and restarting Postgres, verify that the version numbers returned by the following commands match:

SELECT extversion FROM pg_extension WHERE extname = 'pg_search';
SELECT * FROM paradedb.version_info();

If the two versions do not match, restart Postgres and try again.