org.postgresql.util.PSQLException: ERROR: could not read block 0 in file "base/16384/116045":
org.postgresql.util.PSQLException: ERROR: invalid page header in block 2938 of relation base/16384/115816
etc

Steps:

1) Stop the NetFlow Analyzer service.

2) Open command prompt as Administrator and navigate to NetFlow_Home/bin and execute startDB.bat/.sh (Till Build 11001) or startPgsql.bat/.sh ( From Build 12000 and above )

3) The navigate to
NetFlow_Home/pgsql/bin and Connect to the database with the below command:

psql -U postgres -p 13310 -h 127.0.0.1 -d netflow     ( Till version 11001 and upgraded)

psql -U postgres -p 13306 -h 127.0.0.1 -d OpManagerDB    (From 12000 and above )

Once connected execute the below commands:


SET zero_damaged_pages = on;

If only particular table is corrupted follow the below steps:

For each Table follow the below steps
1) VACUUM FULL $damaged_table  
2) REINDEX TABLE $damaged_table
Here,
$damaged_table == Name of the Table that has indexing problem

e.g:
1) psql -U postgres -p 13310 -h 127.0.0.1 -d netflow
2) SET zero_damaged_pages = on; 
3) VACUUM FULL applicationout10min_nfa1
4) REINDEX TABLE applicationout10min_nfa1
To Reindex the entire database :

1) Connect to the database in client and then follow steps 2 to 4
2) SET zero_damaged_pages = on; 
3) VACUUM FULL; 
4) REINDEX database $database_Name;

e.g : For entire database
1) psql -U postgres -p 13310 -h 127.0.0.1 -d netflow
2) SET zero_damaged_pages = on;
3) VACUUM FULL; 
4) REINDEX database netflow;