A full offline vacuum of the database tables is required:
Standalone:
# sudo /usr/share/cb/cbservice cb-enterprise stop
Cluster:
# sudo /usr/share/cb/cbcluster stop
# sudo /usr/share/cb/cbservice cb-pgsql start
- Generate a backup of the tables in a location with enough storage:
pg_dump -C -Fp -f psqldump_full.sql cb -p 5002
- Generate a backup of the user roles:
pg_dumpall -p 5002 --roles-only -f psqlroles.sql
- Regenerate indexes for all tables and redirect output to a file:
# sudo psql -p 5002 -d cb -c "REINDEX DATABASE cb;" 2> /tmp/cbbackup/reindex_output.txt
- Vacuum old/incorrect data and redirect output to a file:
# sudo psql -p 5002 -d cb -c "VACUUM FULL VERBOSE ANALYZE;" 2> /tmp/cbbackup/vacuum_output.txt
- Stop Postgres:
# sudo /usr/share/cb/cbservice cb-pgsql stop
- Start the Response services:
Standalone:
# sudo /usr/share/cb/cbservice cb-enterprise start
Cluster:
# sudo /usr/share/cb/cbcluster start