PostgreSQL Setup

Warning

This article is for general guidance. Always work with your DBA when setting up a production database. If you have any questions, contact Senzing Support. Support is 100% FREE!

Info

When upgrading from Senzing v3 to Senzing v4, there are changes made to the entity repository database schema. See Upgrading the Senzing Repository Schema To V4

Prerequisites

  • A user, password, IP or hostname, and database from your DBA that has select, delete, update, and truncate access

  • A PostgreSQL database tuned for Senzing

  • libpq and psql packages installed

Info
  • Ubuntu/Debian: typically uses libpq5 and postgresql-client-common/postgresql-client-<version> packages
  • AWS Linux 2/RedHat: typically uses postgresql<version>-libs and postgresql<version> packages

Add the Senzing Schema

Info

If applicable, your DBA should set up the database schema. If you have any questions, contact Senzing Support. Support is 100% FREE!

psql -U <user> -d <database> -h <server> -W
\i <senzing_project_path>/resources/schema/szcore-schema-postgresql-create.sqll
Info

<senzing_project_path> refers to the path specified with the /opt/senzing/er/bin/sz_create_project command when creating a project.

\dt
\q

Configure the CONNECTION string

Edit your SENZING_ENGINE_CONFIGURATION_JSON environment variable or sz_engine_config.ini file:

Edit the new CONNECTION postgresql://username:password@hostname:5432:database/?schema=schemaname entry where:

Info

5432 is the default PostgreSQL port number, you need to change this is your port value differs.

  • username = PostgreSQL username
  • password = password for the above username
  • hostname = IP address or hostname of the PostgreSQL Server
  • 5432 = port number of the PostgreSQL Server
  • database = database name
  • /?schema=schemaname = remove unless using custom schema

Update Database with the Senzing ER Configuration

A Senzing instance is configured with a Senzing Entity Resolution configuration. On a fresh installation this configuration needs to be registered in the Senzing database.

See Updating Database with Senzing ER Configuration

Info

If you have any questions, contact Senzing Support. Support is 100% FREE!