How to re-index PostGres database

Document ID : KB000092774
Last Modified Date : 23/04/2018
Show Technical Document Details
Question:

How to recreate all the indexes in the 'mdb' database and remove leftover data from rollback?
Hide Section - Information

 

Environment:
NSM 11.2 SP2 CUM1 on AIX running JMO.

 
Answer:

Steps are:

- unisrvcntr stop all 
- with a tar command, save the PostGres database located in directory /opt/CA/SharedComponents/pgsql
 - unisrvcntr start postgres

Then while logged on as 'root', run the following commands:

psql mdb <passwd> 
  vacuum verbose analyze; 
  reindex database mdb; 
  \q

<passwd> is the password of the 'mdbadmin' account created during the NSM installation, default value is mdbadmin.