Observability reference

The WarehousePG (WHPG) Observability extension creates the observability schema in each database where you install the WHPG Extension. The schema provides a number of views used by the WHPG Exporter to retrieve database and cluster metrics.

Cluster health and configuration

View nameDescription
gp_segment_configurationProvides direct access to the pg_catalog.gp_segment_configuration table.
segments_not_in_preferred_roleShows segments whose current role does not match their preferred role.
gp_segment_configuration_statusProvides details of segment configuration.
table_gp_segment_configProvides the live segment configuration table, listing hostname, content ID, role, status, and directory for each segment.
coordinator_countsProvides counts of the coordinator and standby nodes, including status (up/down) and synchronization mode.
segment_countsProvides counts of all segments, broken down by primary/mirror roles, status (up/down), and synchronization status.
pg_hba_file_rulesProvides the rules defined in the pg_hba.conf file, showing types, databases, users, and authentication methods.
pg_settingsProvides access to the current PostgreSQL and WarehousePG configuration settings.

Query and activity monitoring

View nameDescription
user_queriesProvides currently running user queries, including PID, user name, state, query text, and whether the query is waiting on a lock.
user_queries_countProvides a count of currently running user queries.
user_queries_120sShows active queries that have been running longer than 120 seconds, including the duration and the full query text.
user_queries_count_by_stateProvides a breakdown of user queries by their state (active, idle, idle in transaction) and counts of blocked and long-running queries.
user_queries_count_by_userProvides a count of user queries grouped by the connecting user name.
transaction_countsProvides the total number of committed and rolled-back transactions executed in the database.
pg_stat_databaseProvides access to the pg_stat_database statistics, including transaction commit/rollback counts.

Database size and maintenance

View nameDescription
gp_database_sizeProvides access to the total database size.
table_with_most_dead_rowsProvides a list of the Top 20 tables with the highest number of dead rows, which may indicate a need for vacuuming.
bloated_table_listProvides a list of the Top 20 tables with the highest ratio of dead rows to total rows.
top_n_largest_tablesProvides the Top 20 largest tables by disk size.
top_n_not_analyzed_tablesProvides the Top 20 tables with the largest number of columns missing statistics.
top_n_not_vacuumed_tablesProvides the Top 20 tables with dead rows that have never been vacuumed or auto-vacuumed.
top_n_skewed_tablesProvides the Top 20 tables with a data skew coefficient greater than 1.5.
table_need_indexProvides tables that may need an index, identified by a high number of sequential scans compared to index scans.
object_listProvides a list of tables and views grouped by schema, including a count of total objects, tables, and views per schema.

Spill files

View nameDescription
gp_spill_file_detailsProvides access to the details of spill files used by running queries.
total_spill_file_detailsProvides the total spill file count and size in bytes, aggregated per database.
spill_count_per_primary_segProvides the total spill file count and size in bytes, aggregated per primary segment ID.
total_segment_spill_file_detailsProvides the total spill file count and size per segment, joining spill details with segment configuration status.
top_n_spilling_queriesProvides the Top 20 queries currently causing the most disk spill.

Resource groups

View nameDescription
resgroup_configProvides the resource group configuration (columns are different between Warehouse versions 6.x and 7.x).
resgroup_statusProvides the status of resource groups, including running, queued, and total executed queries, and total queue time.
resgroup_status_configProvides a combination of resource group status and configuration details.
resgroup_status_per_hostProvides resource group usage status per host (e.g., CPU, memory usage).
resgroup_status_per_segmentProvides resource group usage status per segment.

Could this page be better? Report a problem or suggest an addition!