Configuring PostgreSQL as a Backend Database

Starting with v1.4.5, HCL SafeLinx supports PostgreSQL as a backend database server. To ensure SafeLinx can successfully connect to your PostgreSQL database, specific client applications and ODBC drivers must be installed and correctly configured on the server where SafeLinx is hosted.

Before you begin

Before configuring SafeLinx to use a PostgreSQL database, verify that the following components are installed on the SafeLinx server:
  • PostgreSQL Client (psql)
  • PostgreSQL ODBC Drivers

Linux Configuration Requirements

For Linux environments, both the psql client and the PostgreSQL ODBC drivers are strictly required. SafeLinx relies on the ODBC configuration of the system to locate the appropriate drivers for database connectivity.

When establishing a connection, SafeLinx checks the /etc/odbcinst.ini (or /etc/odbcinst) configuration file to locate the PostgreSQL drivers.

  1. Open your ODBC configuration file (typically /etc/odbcinst.ini).
  2. Locate the PostgreSQL driver entry.
  3. Verify the Driver64 attribute. The file path specified in Driver64="<filename>" must point to an existing file on your system.

If the specified driver file is not available at that exact location, SafeLinx will fail to connect to the PostgreSQL database.

Troubleshooting Missing ODBC Drivers

In some cases, the default driver path added during installation might not match the actual file location on your system.

  • Default Path Issue: The configuration file may list a default path such as Driver64=/usr/lib64/psqlodbcw.so, but this file might not exist.

  • Resolution: If the default .so file is missing, search your system for the correct driver location. For example, if you are using PostgreSQL 16, the driver might be located at /usr/pgsql-16/lib/psqlodbcw.so.

  • Update the Configuration: Once you locate the correct .so file, update the Driver64 path in your /etc/odbcinst.ini file to match the available file path.

    Example odbcinst.ini update:

    Ini
    [PostgreSQL]
    Description = ODBC for PostgreSQL
    Driver64 = /usr/pgsql-16/lib/psqlodbcw.so
    Setup64 = /usr/lib64/libodbcpsqlS.so
    Note: For more information on configuring relational databases for SafeLinx, refer to the Persistent data storage requirements documentation.