Post-install Script Fails to Determine PostgreSQL Server Version

When finalizing upgrades, the postinstall.sh may fail to determine PrivX's PostgreSQL database version for multiple reasons. It may show an error like the following:

ERROR: Failed to automatically determine the PostgreSQL
 server version. This PrivX version requires PostgreSQL
 server version <version> or higher. 

If you are certain that your PostgreSQL server is <version> or
 higher, you can explicitly skip the version check. 
Run the following commands to resume the current operation
 while skipping the database version check":

Resume installation:
    export PRIVX_SKIP_DB_VERSION_CHECK=true
    /opt/privx/scripts/postinstall.sh

Resume normal upgrade (not zero-downtime upgrade):
    export PRIVX_SKIP_DB_VERSION_CHECK=true
    /opt/privx/scripts/postinstall.sh

Resume first stage upgrade (in zero-downtime upgrade, e.g if version check error occurred while running upgrade_first_stage.sh):
    export PRIVX_SKIP_DB_VERSION_CHECK=true
    UPGRADE_STYLE=no_downtime /opt/privx/scripts/postinstall.sh

Potential Solution

Confirm that the PostgreSQL server is running a version that is supported by your PrivX release. The PostgreSQL protocols supported by PrivX can be seen here.

Once you do, resume the installation or upgrade process as described in the error message.

  • During upgrade, if you are prompted to continue installation without removing existing files, answer Yes.
  • Do not perform a clean installation. Doing so may remove critical files and make your PrivX deployment unusable.

If you are certain that your database meets the version requirement, you can bypass the version check by setting PRIVX_SKIP_DB_VERSION_CHECK=true before resuming installation/upgrade.

Setting PRIVX_SKIP_DB_VERSION_CHECK=true only bypasses version detection failures. It does not allow you to continue if an unsupported PostgreSQL version can be detected by postinstall.sh. In such cases, you must first upgrade the PostgreSQL server to a supported version.

Was this page helpful?