Upgrading AI Accelerator Pipelines#

From version 4.3.0 onwards, AI Accelerator supports in-place updates for the extension. Once the new version is installed you can run the ALTER EXTENSION command to update the extension in your Postgres database.

ALTER EXTENSION aidb UPDATE;

If you are upgrading from a version prior to 4.3.0, you need to follow the steps below to ensure a clean upgrade. This is because the extension was not designed for in-place updates before this version.

Upgrading the Pipelines Extension (aidb)#

!!!Note This doesn’t delete any managed data. It just ensures that no dangling references (e.g. Triggers) remain while AIDB is uninstalled, and allows you to do a clean setup after upgrading.

1. Delete all configured Pipelines#

Get a list of all the knowledge base and preparer pipelines you have configured: SELECT name FROM aidb.knowledge_bases; and SELECT name FROM aidb.preparers; . Then delete all knowledge bases and preparer by calling SELECT aidb.delete_knowledge_base('name'); and SELECT aidb.delete_preparer('knowledge_base__5887'); .

You can use this SQL code to do both in one operation:

WITH names AS (SELECT name FROM aidb.knowledge_bases)
  SELECT aidb.delete_knowledge_base(name) FROM names;

WITH names AS (SELECT name FROM aidb.preparers)
  SELECT aidb.delete_preparer(name) FROM names;

2. Uninstall the old version of the extension#

edb=# DROP EXTENSION aidb CASCADE;
DROP EXTENSION
edb=#

3. Install the new version of the extension in your environment#

Follow the same steps you took to install the old version: AI Accelerator Pipelines .

4. Create the extension in your Postgres Database#

edb=# CREATE EXTENSION aidb CASCADE;
NOTICE:  installing required extension "vector"
CREATE EXTENSION
edb=#

5. Re-create the Pipelines you want to use#

Run the same commands you originally ran to create the Pipelines.

Upgrading PGFS#

If you are using PGFS, you will need to drop and re-create the extension after upgrading.

!!!Note This will delete references to your PGFS storage locations; it will not delete the actual data. Storage locations need to be re-created after upgrading.

DROP EXTENSION pgfs CASCADE;
CREATE EXTENSION pgfs CASCADE;