Using a custom PostgreSQL database other than the default postgres

End of Life Notice

CAST Storage Service (com.castsoftware.css) is End of Life and is no longer supported or distributed. Customers previously using CAST Storage Service must migrate to a standard PostgreSQL installation. CAST recommends PostgreSQL 18.x.

Introduction

Changes have been made to AIP Core and other CAST AIP tools to make it possible to connect to a custom PostgreSQL database other than the default “postgres” (previously custom databases were not permitted for use with CAST). The current compatibility matrix is as below:

Supported?Supported inNotes
AIP Console≥ 1.27.0-funcrel / 2.0.0-funcrelWhen using AIP Console with automatic synchronization to CAST Imaging, custom databases are supported as long as the releases of AIP Console and CAST Imaging are supported for this scenario.
AIP Core≥ 8.3.40This includes any tool/application delivered with AIP Core such as CAST Server Manager, CAST Management Studio, CAST Enlighten, CAST Transaction Configuration Center, CSS Admin Tools etc.
Standalone CAST Dashboards and RestAPIAny release.-
CAST Imaging export tools≥ 2.6.0-funcrelThis includes exporter.exe and etl-automation.exe.
CAST Sherlock≥ 9.0.2-funcrel≥ 9.0.2-funcrel is also embedded in AIP Core ≥ 8.3.41.
Architecture Checker (as an extension)-Not supported yet.

To be able to exploit this change, if required, please see information below.

AIP Console

Release ≥ 1.27 / ≥ 2.0 has this ability built in:

≥ 1.27

AIP Node installation:

AIP Node app-node-app.properties:

Measurement schema configuration:

≥ 2.0

When adding a new PostgreSQL instance:

CAST Dashboards and RestAPI

PostgreSQL connections are defined using JDBC URLs which specify the database “postgres” out of the box:

WAR 1.x - context.xml
<Resource name="jdbc/domains/AED" url="jdbc:postgresql://localhost:2280/postgres"

WAR/ZIP 2.x - application.properties
restapi.datasource[0].url=jdbc:postgresql://localhost:2282/postgres
spring.datasource.url=jdbc:postgresql://localhost:2282/postgres?ApplicationName=DASHBOARDS&currentSchema=cast_dashboards

These JDBC URLs must be modified to change the “postgres” database to the custom database name (as described in https://jdbc.postgresql.org/documentation/head/connect.html) for example:

WAR 1.x - context.xml
<Resource name="jdbc/domains/AED" url="jdbc:postgresql://localhost:2280/custom_database"

WAR/ZIP 2.x - application.properties
restapi.datasource[0].url=jdbc:postgresql://localhost:2282/custom_database
spring.datasource.url=jdbc:postgresql://localhost:2282/custom_database?ApplicationName=DASHBOARDS&currentSchema=cast_dashboards

Legacy tools in AIP Core

CAST Server Manager / CAST Enlighten

The UI has not been modified, however to connect to a database other than “postgres”, create a new profile and either use the Server name/IP:port field or the Connection string field, for example:

Standard connection<host/IP_address>:,<database_name>
Connection stringLIBPQ:<host/IP_address>:,<database_name>

CAST Management Studio/pmx files

The UI for tools using .pmx connection files (such as CAST Management Studio) has not been modified to allow a connection to a database other than “postgres”, however, it is possible to build/edit your own custom cast-ms.connectionProfiles.pmx and specify your custom database name in this .pmx file. See Using the CAST-Connection-Profile-Configuration.py file.

The Database Connections Manager in CAST Management Studio will show the details about a connection to a custom database:

CAST Transaction Configuration Center

The UI has not been modified, however to connect to a database other than “postgres”, use the Quick Connection option and specify the custom database name (or select a PMX based profile if one has already been created):

Quick Connection
PMX based profile