AppManager_home>\working\pgsql\bin>pg_ctl.exe -w -D ..\data\amdb -o -p15435 start
<AppManager_home>\working\pgsql_9\bin>pg_ctl.exe -w -D ..\data\amdb -o -p15436 start
AppManager_home>\working\pgsql\bin>set PGPASSWORD=appmanager
AppManager_home>\working\pgsql\bin>psql.exe -U postgres -p 15435 -h localhost
postgres=#DROP DATABASE IF EXISTS amdb;
postgres=#CREATE DATABASE amdb;
postgres=#\c amdb;
amdb=#CREATE EXTENSION "pgcrypto";
amdb=#CREATE EXTENSION CITEXT;
amdb=#CREATE EXTENSION pg_stat_statements;
amdb=#CREATE EXTENSION amcheck;
amdb=#\q
To dump the database from old to new execute the below commands one by one: (SQL Dump)
AppManager_home\working\pgsql_9\bin>set PGPASSWORD=appmanager
AppManager_Home\working\pgsql_9\bin>pg_dump.exe -U postgres -p 15436 -h localhost -c -v -f C:\Programfiles\ManageEngine\AppManager14\dump9.sql amdb
AppManager_Home\working\pgsql_9\bin\>cd AppManager_Home\working\pgsql\bin
AppManager_Home\working\pgsql\bin>set PGPASSWORD=appmanager
AppManager_Home\working\pgsql\bin>psql.exe -U postgres -p 15435 -h localhost -d amdb -c -v -f F:\ManageEngine\AppManager14\dump9.sql