Postgres Dba
PostgreSQL WAL Settings Query Guide
Mar 16, 2026 / · 6 min read · postgresql database administration sql queries configuration wal durability pg_settings postgres dba ·PostgreSQL WAL Settings Query Guide This PostgreSQL query retrieves all Write-Ahead Log (WAL) configuration settings from the pg_settings system view. WAL settings control durability, crash recovery, checkpointing, archiving, and replication log generation. Purpose and Overview The Write-Ahead Log is the foundation of …
Read MoreList PostgreSQL Tables by Size with SQL
Mar 15, 2026 / · 5 min read · postgresql database administration sql queries storage performance tuning pg_class postgres dba information_schema pg_indexes pg_namespace pg_stat_user_indexes pg_stat_user_tables ·List PostgreSQL Tables by Size with SQL This PostgreSQL query lists all tables in the current database sorted by their total size, largest first. It uses pg_total_relation_size() to include the table data, indexes, TOAST storage, and free space map in the size calculation. Purpose and Overview Disk space pressure is a …
Read MorePostgreSQL Table Row Count Estimates with SQL
Mar 14, 2026 / · 4 min read · postgresql database administration sql queries performance tuning statistics pg_stat_user_tables postgres dba pg_class pg_namespace information_schema ·PostgreSQL Table Row Count Estimates with SQL This PostgreSQL query returns estimated row counts for all user tables, sorted by the largest tables first. It reads from the statistics collector rather than scanning the tables, making it near-instant even on tables with billions of rows. Purpose and Overview Counting …
Read MorePostgreSQL File Location Settings Query via pg_settings
Sep 7, 2025 / · 3 min read · postgresql database administration sql queries configuration file management system views database tuning postgres dba pg_settings ·PostgreSQL File Location Settings Query Guide This PostgreSQL query helps database administrators examine file location configuration settings by querying the pg_settings system view. It retrieves essential information about where PostgreSQL stores its files and directories. Purpose and Overview The query targets …
Read More