Pg_stat_database
PostgreSQL Database Statistics with pg_stat_database
Apr 15, 2026 / · 4 min read · postgresql administration monitoring database performance pg_stat_database ·Monitor PostgreSQL Databases with pg_stat_database PostgreSQL tracks activity at the database level in the pg_stat_database view. Every database on the server has a row, and each row contains counters for commits, rollbacks, cache hits, disk reads, deadlocks, temp file usage, and more. This is one of the first places …
Read MorePostgreSQL Resource Settings Query Guide
Mar 18, 2026 / · 5 min read · postgresql database administration sql queries configuration performance tuning resource management pg_settings postgres dba pg_stat_database ·PostgreSQL Resource Settings Query Guide This PostgreSQL query retrieves all resource usage configuration settings from the pg_settings system view. Resource settings control how PostgreSQL allocates memory, disk, and CPU resources across queries, background processes, and maintenance operations. Purpose and Overview …
Read MorePostgreSQL Statistics Settings Query Guide This PostgreSQL query retrieves all statistics collection configuration settings from the pg_settings system view. These parameters control what runtime data PostgreSQL collects about query execution, table activity, and performance, feeding into the pg_stat_* monitoring …
Read MorePostgreSQL Backend Connections via pg_stat_database
Mar 20, 2024 / · 3 min read · postgresql database administration performance optimization pg_stat_database ·Database Connections: A Look at PostgreSQL Backends This article delves into a PostgreSQL code snippet that sheds light on the number of backend connections established for each database within a PostgreSQL instance. We'll dissect the code, explore its purpose, and glean valuable insights for database administrators …
Read More