Rollback Plan
Follow these rollback steps to quickly recover if something fails, or goes wrong during or after the run
- Restore Autovacuum Settings:
The
idspgmaintutility resets temporary autovacuum changes on exit. If interrupted, re-enable autovacuum on affected tables:ALTER TABLE idsldap.table RESET (autovacuum_enabled); - Restore Connection Settings:
Normally,
idspgmaintresets connections afterVACUUM FULL. If it fails in exclusive mode, unblock connections with:ALTER DATABASE idsldap WITH CONNECTION LIMIT -1; GRANT CONNECT ON DATABASE idsldap TO PUBLIC; - Rebuild Indexes if Interrupted:
Partially completed
REINDEXmay leave invalid indexes. Check for them:SELECT schemaname, relname, indexrelname FROM pg_stat_all_indexes WHERE NOT indisvalid;Rebuild invalid indexes:REINDEX INDEX index_name;If REINDEX fails, drop the invalid indexes:DROP INDEX index_name; - Re-run ANALYZE:
If ANALYZE did not finish, run-
ANALYZE VERBOSE; - Restore from Backup (Last Resort):
If corruption or major failure occurs:
1. Stop the application.
2. Restore from the latest physical backup or
pg_basebackupsnapshot.3. Apply WAL files if using Point-In-Time Recovery (PITR).