PostgreSQL versions

Black Duck 2023.10.0 supports new PostgreSQL features and functionality to improve the performance and reliability of the Black Duck service. As of Black Duck 2023.10.0, PostgreSQL 14 is the supported version of PostgreSQL for the internal PostgreSQL container.

Starting with Black Duck 2023.10.0, PostgreSQL settings will be automatically set in deployments using the PostgreSQL container. Customers using external PostgreSQL will still need to apply the settings manually.

Customers using the PostgreSQL container and upgrading from versions of Black Duck between 2022.2.0 and 2023.7.x (inclusive), will be automatically migrated to PostgreSQL 14. Customers upgrading from older versions of Black Duck will need to upgrade to 2023.7.x before upgrading to 2024.7.0.

Note: For PostgreSQL sizing guidelines, see Black Duck Hardware Scaling Guidelines.

If you choose to run your own external PostgreSQL instance, Black Duck recommends the latest version PostgreSQL 16 for new installs.

Note: Black Duck 2024.4.0 added preliminary support for using PostgreSQL 16 as an external database for testing only; beginning with Black Duck 2024.7.0, PostgreSQL 16 is fully supported for production use.
CAUTION: Do not run antivirus scans on the PostgreSQL data directory. Antivirus software opens lots of files, puts locks on files, etc. Those things interfere with PostgreSQL operations. Specific errors vary by product but usually involve the inability of PostgreSQL to access its data files. One example is that PostgreSQL fails with "too many open files in the system."

General Migration Process

The guidance here applies to upgrading from any PG 9.6 based Hub (releases prior to 2022.2.0) to 2022.10.0 or later.

  1. The migration is performed by the blackduck-postgres-upgrader container.

  2. If you are upgrading from a PostgreSQL 9.6-based Version of Black Duck:

    • The folder layout of the PostgreSQL data volume is rearranged to make future PostgreSQL version upgrades simpler.

    • The UID of the owner of the data volume is changed. The new default UID is 1001, but see the deployment-specific instructions.

  3. The pg_upgrade script is run to migrate the database to PostgreSQL 13.

  4. Plain ANALYZE is run on the PostgreSQL 13 database to initialize query planner statistics.

  5. blackduck-postgres-upgrader exits.