While Installing Postgres as an APM database, the Installation fails with an error "Postgres Instance already exists" even though Postgres was Uninstalled.

Document ID : KB000047615
Last Modified Date : 14/02/2018
Show Technical Document Details

Issue:

      While installing Postgres as an APM database, the installation fails with an error "Postgres Instance already exists" even though Postgres has been uninstalled. The following error is reported:

 Postgres Instance already exists.  If you have an existing PostgreSQL-<version> instance, please uninstall it and then install a new instance. You may also use the existing instance to create new APM schema.

 No files are present in the target Postgres installation directory and this occurs regardless of how the validateDatabase and validateSchema properties are set during install.

 

 Environment:

     Any Unix based OS with Postgres used as the APM 10.x database. 

 

 Cause:

     This issue typically occurs when installing Postgres on a server where a manual uninstall of Postgres has already been performed. (See TEC597388 for further details on this procedure.) The error occurs because the installer checks for the presence of a Postgres script inside the /etc/init.d directory.

 

 Resolution:

    To address this issue, login as a root user and remove this script:

cd /etc/init.d
rm -f postgresql-<version>

 

 Additional Information:

     As always, contact CA  Support if you have any questions.