This section lists monitoring and maintenance activities recommended to ensure high availability and consistent performance of your WarehousePG cluster.
The tables in the following sections suggest activities that a WarehousePG cluster Administrator can perform periodically to ensure that all components of the system are operating optimally. Monitoring activities help you to detect and diagnose problems early. Maintenance activities help you to keep the system up-to-date and avoid deteriorating performance, for example, from bloated system tables or diminishing free disk space.
It is not necessary to implement all of these suggestions in every cluster; use the frequency and severity recommendations as a guide to implement measures according to your service requirements.
Parent topic: Managing a WarehousePG cluster
Database State Monitoring Activities
Database State Monitoring Activities
Hardware and Operating System Monitoring
Hardware and Operating System Monitoring Activities
Catalog Monitoring
Catalog Monitoring Activities
Data Maintenance
Data Maintenance Activities
Database Maintenance
Database Maintenance Activities
| Activity | Procedure | Corrective Actions |
|---|---|---|
| Reclaim space occupied by deleted rows in the heap tables so that the space they occupy can be reused. Recommended frequency: daily Severity: CRITICAL | Vacuum user tables:VACUUM <table>; | Vacuum updated tables regularly to prevent bloating. |
| Update table statistics. Recommended frequency: after loading data and before executing queries Severity: CRITICAL | Analyze user tables. You can use the analyzedb management utility:analyzedb -d <database> -a | Analyze updated tables regularly so that the optimizer can produce efficient query execution plans. |
| Backup the database data. Recommended frequency: daily, or as required by your backup plan Severity: CRITICAL | Run the gpbackup utility to create a backup of the coordinator and segment databases in parallel. | Best practice is to have a current backup ready in case the database must be restored. |
| Vacuum, reindex, and analyze system catalogs to maintain an efficient catalog. Recommended frequency: weekly, or more often if database objects are created and dropped frequently | 1. VACUUM the system tables in each database.2. Run REINDEX SYSTEM in each database, or use the reindexdb command-line utility with the -s option:reindexdb -s <database>3. ANALYZE each of the system tables:analyzedb -s pg_catalog -d <database> | The optimizer retrieves information from the system tables to create query plans. If system tables and indexes are allowed to become bloated over time, scanning the system tables increases query execution time. It is important to run ANALYZE after reindexing, because REINDEX leaves indexes with no statistics. |
Patching and Upgrading
Patch and Upgrade Activities
| Activity | Procedure | Corrective Actions |
|---|---|---|
| Ensure any bug fixes or enhancements are applied to the kernel. Recommended frequency: at least every 6 months Severity: IMPORTANT | Follow the vendor's instructions to update the Linux kernel. | Keep the kernel current to include bug fixes and security fixes, and to avoid difficult future upgrades. |
| Install WarehousePG minor releases, for example 5.0.x. Recommended frequency: quarterly Severity: IMPORTANT | Follow upgrade instructions in the WarehousePG Release Notes. Always upgrade to the latest in the series. | Keep the WarehousePG software current to incorporate bug fixes, performance enhancements, and feature enhancements into your WarehousePG cluster. |
