Skip to content

Default Thresholds Reference

This page lists every built-in check a fresh install seeds, together with the default threshold it ships with — the exact rules pghf.evaluate_run() judges each result against until you override them. It is generated from a fully-seeded catalog: 175 checks, 114 default thresholds.

To see the live values on your own install (which may differ if you've called pghf.set_threshold() since installing):

SELECT * FROM pghf.list_thresholds();

How to read the tables

  • Judged as is the check's classification, fixed in the catalog: lower is better means a tier breaches when the value exceeds it, higher is better when the value falls below it (so for higher-is-better checks the smallest cutoff is the most severe tier). Boolean checks show their pass value; the threshold names the severity assigned when the observed value doesn't match it.
  • A rule of > 0 on a count means "any at all" — a single occurrence fires that tier.
  • Threshold values are in the check's native unit, shown in the Result column (kilobytes, pages, milliseconds, …).
  • none — … rows are deliberate: the stated reason is recorded as a comment in sql/24_seed_data.sql alongside the seeding calls. A check with no threshold (and no custom evaluator) evaluates as not_evaluable, which ranks below ok and never alerts.
  • none yet — … rows are text/jsonb-typed checks the default comparator cannot judge; each needs a custom evaluator_routine (seven built-ins already have one — see Built-in Custom Evaluators).
  • Breach confirmation is instant for every seeded default: no check ships with breach-side debounce (min_consecutive_breaches stays at 1) — a check's very first breaching run always confirms right away, so a fresh install genuinely reveals real problems on its first run. Recovery is a different story — see the note below.

Seeded hysteresis: two confirmations to clear, not one

Every check above that has a threshold (114 of them, minus the 11 seeded-on-demand/category-10 ones — see Suites) also ships with min_consecutive_clears => 2 and a min_consecutive_window sized to twice that check's own suite cadence — clearing a confirmed breach needs 2 consecutive clean evaluated runs, not just one. This is a count of runs, not a minimum elapsed wall-clock time: if you've just fixed the underlying problem, calling pghf.run_and_evaluate() twice in a row clears it immediately — you don't need to wait for the check's normal schedule. What this actually protects against is a single lucky/noisy sample clearing a still-real problem on an unattended scheduled run, not a DBA who just fixed and manually re-verified it. This is orthogonal to the tiers in the tables below; see Symmetric recovery for the mechanics and the exact per-cadence window sizes. It's also only a recommendation calibrated to a check's assigned suite name — this project has no scheduler, so nothing guarantees a check actually runs that often; retune with pghf.set_threshold() if your real usage differs.

Prerequisite-gated checks

Five checks register only when their backing extension is installed on the node at seed time: PGHF03-012, PGHF04-008, PGHF04-011 (pg_stat_statements), PGHF07-007 (amcheck), and PGHF08-006 (pg_visibility). PGHF04-011's threshold below is likewise only seeded when that check registered. On a node without those extensions you'll see 170 checks and 113 thresholds instead.

Every threshold here is a starting point, not a verdict — update any of them for your site with pghf.set_threshold() (one threshold per check, applying wherever the check runs). For what each check measures and how to fix a breach, follow the category headings into the Check Reference pages.

C01 — Connection & Availability

Check Name Result Judged as Default threshold
PGHF01-001 SSL/TLS enabled boolean pass = true warning when false
PGHF01-002 PostgreSQL version integer (years_past_eol) lower is better critical > 1 · warning > 0 · info > -1
PGHF01-003 Connection saturation numeric (percent) lower is better critical > 90 · warning > 75
PGHF01-004 Oldest idle-in-transaction session age integer (seconds) lower is better warning > 30
PGHF01-005 Per-database connection counts jsonb none yet — jsonb result needs a custom evaluator
PGHF01-006 pg_hba TRUST on non-loopback integer (count) lower is better critical > 0

C02 — pgBackRest Configuration & WAL Archiving

Check Name Result Judged as Default threshold
PGHF02-001 archive_command text none yet — text result needs a custom evaluator
PGHF02-002 pg_stat_archiver failures integer (count) lower is better warning > 1
PGHF02-003 Incremental-backup readiness (summarize_wal) boolean pass = true warning when false

C03 — Performance Parameters

Check Name Result Judged as Default threshold
PGHF03-001 shared_buffers eviction ratio jsonb none yet — jsonb result needs a custom evaluator
PGHF03-002 work_mem worst-case total jsonb none yet — jsonb result needs a custom evaluator
PGHF03-003 maintenance_work_mem integer (kilobytes) higher is better critical < 131072 · warning < 163840 · info < 262144
PGHF03-004 effective_cache_size integer (pages) higher is better info < 524289
PGHF03-005 max_parallel_workers_per_gather integer (workers) higher is better warning < 2
PGHF03-006 min_parallel_table_scan_size integer (pages) lower is better warning > 131072 · info > 1024
PGHF03-007 checkpoint_completion_target numeric (fraction) higher is better critical < 0.5 · warning < 0.7 · info < 0.9
PGHF03-008 Requested checkpoint ratio jsonb none yet — jsonb result needs a custom evaluator
PGHF03-009 wal_compression text none yet — text result needs a custom evaluator
PGHF03-010 random_page_cost numeric (relative_cost) lower is better warning > 4.0 · info > 1.1
PGHF03-011 effective_io_concurrency integer (count) higher is better info < 2
PGHF03-012 JIT overhead jsonb none yet — jsonb result needs a custom evaluator
PGHF03-013 wal_buffers integer (pages) higher is better info < 512
PGHF03-014 default_statistics_target integer (count) higher is better info < 100
PGHF03-015 Temp file spill integer (bytes) lower is better critical > 10737418240
PGHF03-016 Database cache hit ratio numeric (percent) higher is better warning < 90 · info < 95
PGHF03-017 track_io_timing text none yet — text result needs a custom evaluator
PGHF03-018 Parallel worker pool saturation numeric (percent) lower is better critical > 95 · warning > 85 · info > 70
PGHF03-019 track_wal_io_timing boolean pass = true warning when false
PGHF03-020 pg_stat_io relation-extend pressure numeric (milliseconds) lower is better none — cumulative-since-reset counter; a flat cutoff would eventually fire regardless of current health; it needs a baseline evaluator

C04 — Long-Running Queries & Lock Contention

Check Name Result Judged as Default threshold
PGHF04-001 Longest-running query age integer (seconds) lower is better critical > 300 · warning > 60
PGHF04-002 Idle-in-transaction age integer (seconds) lower is better critical > 300
PGHF04-003 Lock blocker chains integer (count) lower is better critical > 20 · warning > 5 · info > 0
PGHF04-004 Deadlock count integer (count) lower is better warning > 0
PGHF04-005 statement_timeout integer (milliseconds) higher is better info < 1
PGHF04-006 idle_in_transaction_session_timeout integer (milliseconds) higher is better warning < 1
PGHF04-007 pg_stat_statements extension boolean pass = true warning when false
PGHF04-008 Top queries by total_exec_time jsonb none yet — jsonb result needs a custom evaluator
PGHF04-009 log_min_duration_statement integer (milliseconds) higher is better info < 0
PGHF04-010 lock_timeout integer (milliseconds) higher is better info < 1
PGHF04-011 Worst mean exec time (statistically-significant queries) numeric (milliseconds) lower is better warning > 5000

C05 — Vacuum & Autovacuum Health

Check Name Result Judged as Default threshold
PGHF05-001 Database TXID age numeric (transactions) lower is better critical > 1800000000 · warning > 1000000000
PGHF05-002 Table TXID age numeric (transactions) lower is better critical > 1800000000 · warning > 1000000000
PGHF05-003 Dead tuple ratio integer (count) none — the scalar is a population count; the real signal is the top-N detail list
PGHF05-004 Last autovacuum age integer (count) none — the scalar is a population count; the real signal is the top-N detail list
PGHF05-005 Tables with autovacuum disabled integer (count) lower is better warning > 0
PGHF05-006 autovacuum_vacuum_scale_factor numeric (fraction) lower is better warning > 0.4 · info > 0.2
PGHF05-007 autovacuum_max_workers integer (count) higher is better info < 3
PGHF05-008 autovacuum_vacuum_cost_delay numeric (milliseconds) lower is better warning > 10 · info > 2
PGHF05-009 Table bloat estimate integer (count) none — the scalar is a population count; the real signal is the top-N detail list
PGHF05-010 In-progress vacuum age integer (count) none — the scalar is a population count; the real signal is the top-N detail list
PGHF05-011 autovacuum_work_mem integer (kilobytes) higher is better info < 0
PGHF05-012 Multixact wraparound age numeric (multixact_ids) lower is better critical > 1800000000 · warning > 1000000000
PGHF05-013 Oldest prepared transaction age integer (seconds) lower is better warning > 3600
PGHF05-014 Autovacuum worker saturation numeric (percent) lower is better critical > 98 · warning > 90 · info > 80
PGHF05-015 Table statistics staleness integer (count) none — the scalar is a population count; the real signal is the top-N detail list
PGHF05-016 pg_stat_io eviction pressure by context jsonb none — what counts as "too much" eviction scales with shared_buffers and workload; needs a baseline evaluator

C06 — Index Health

Check Name Result Judged as Default threshold
PGHF06-001 Unused indexes integer (count) lower is better warning > 10 · info > 0
PGHF06-002 Duplicate indexes integer (count) lower is better warning > 5 · info > 0
PGHF06-003 Invalid indexes integer (count) lower is better critical > 3 · warning > 0
PGHF06-004 Index size vs row count integer (count) none — the scalar is a population count; the real signal is the top-N detail list
PGHF06-005 FK columns without index integer (count) lower is better warning > 10 · info > 0
PGHF06-006 Prefix-redundant indexes integer (count) lower is better warning > 5 · info > 0
PGHF06-007 Low-cardinality indexed columns integer (count) lower is better info > 0
PGHF06-008 BRIN index correlation integer (count) lower is better info > 0
PGHF06-009 Statistics reset date text none yet — text result needs a custom evaluator
PGHF06-010 Tables without primary key integer (count) lower is better warning > 10 · info > 0

C07 — TOAST Table & Corruption Detection

Check Name Result Judged as Default threshold
PGHF07-001 data_checksums boolean pass = true warning when false
PGHF07-002 Checksum failures integer (count) lower is better critical > 0
PGHF07-003 TOAST reference integrity integer (count) lower is better critical > 0
PGHF07-005 Orphaned TOAST tables integer (count) lower is better critical > 3 · warning > 0
PGHF07-006 TOAST size vs main table integer (count) none — the scalar is a population count; the real signal is the top-N detail list
PGHF07-007 amcheck index verification jsonb none yet — jsonb result needs a custom evaluator
PGHF07-008 Cache hit ratio (user tables) numeric (percent) higher is better warning < 90 · info < 95
PGHF07-009 Relation integrity probe availability boolean pass = true info when false
PGHF07-010 default_toast_compression text custom evaluator — pghf.evaluate_c07_010_toast_compression()

C08 — Visibility Map Integrity

Check Name Result Judged as Default threshold
PGHF08-001 Heap block reads vs index scans integer (count) none — the scalar is a population count; the real signal is the top-N detail list
PGHF08-002 relallvisible consistency integer (count) lower is better warning > 20 · info > 0
PGHF08-003 Post-crash visibility map advisory boolean none — the value is pg_is_in_recovery() — context, not pass/fail (a standby would breach forever)
PGHF08-004 pg_visibility extension boolean pass = true info when false
PGHF08-005 Dead tuple counter anomaly candidates integer (count) none — the scalar is a population count; the real signal is the top-N detail list
PGHF08-006 VM integrity (pg_visibility) jsonb none yet — jsonb result needs a custom evaluator

C09 — WAL & Replication Slot Health

Check Name Result Judged as Default threshold
PGHF09-001 Worst inactive replication slot lag integer (bytes) lower is better critical > 524288000 · warning > 52428800
PGHF09-002 Worst retained WAL vs max_slot_wal_keep_size numeric (percent) lower is better critical > 90 · warning > 70
PGHF09-003 Replication slot count vs max_replication_slots numeric (percent) lower is better warning > 80
PGHF09-004 Replication lag (pg_stat_replication) jsonb none yet — jsonb result needs a custom evaluator
PGHF09-005 Unnamed standbys integer (count) lower is better info > 0
PGHF09-006 recovery_min_apply_delay text none yet — text result needs a custom evaluator
PGHF09-007 wal_keep_size vs unslotted standbys integer (count) lower is better warning > 0
PGHF09-008 WAL archiving cross-reference jsonb none yet — jsonb result needs a custom evaluator
PGHF09-009 Invalidated replication slots integer (count) lower is better warning > 0
PGHF09-010 max_slot_wal_keep_size integer (megabytes) higher is better warning < 0
PGHF09-011 Inactive logical slots integer (count) lower is better critical > 0
PGHF09-012 Logical replication subscription health jsonb custom evaluator — pghf.evaluate_c09_012_subscription_health()
PGHF09-013 Subscription table sync state jsonb none yet — jsonb result needs a custom evaluator
PGHF09-014 Streaming replication lag (time) jsonb custom evaluator — pghf.evaluate_c09_014_replication_lag()
PGHF09-015 logical_decoding_work_mem integer (kilobytes) higher is better info < 65536
PGHF09-016 Failover-ready logical slot synchronization integer (count) lower is better warning > 0

C10 — pg_upgrade Readiness

Check Name Result Judged as Default threshold
PGHF10-001 Legacy extensions (tsearch2/plpython2u) integer (count) lower is better warning > 0
PGHF10-002 PostGIS version check jsonb none yet — jsonb result needs a custom evaluator
PGHF10-003 abstime/reltime/tinterval columns integer (count) lower is better warning > 0
PGHF10-004 money type columns integer (count) lower is better info > 0
PGHF10-005 SQL_ASCII databases integer (count) lower is better warning > 0
PGHF10-006 Collation version jsonb none yet — jsonb result needs a custom evaluator
PGHF10-007 Tables approaching 1600-column limit integer (count) none — the scalar is a population count; the real signal is the top-N detail list
PGHF10-008 Pending prepared transactions integer (count) lower is better warning > 0
PGHF10-009 Logical slots on upgrade integer (count) lower is better warning > 0
PGHF10-010 C-language functions integer (count) lower is better info > 0
PGHF10-011 plpython2u functions integer (count) lower is better warning > 0
PGHF10-012 Ghost extensions integer (count) lower is better warning > 0
PGHF10-013 Large objects integer (count) lower is better warning > 1000000 · info > 100000
PGHF10-014 Custom tablespace paths jsonb none yet — jsonb result needs a custom evaluator
PGHF10-015 datconnlimit=0 databases integer (count) lower is better warning > 0

C11 — Security Posture

Check Name Result Judged as Default threshold
PGHF11-001 Superusers without password integer (count) lower is better warning > 0
PGHF11-002 MD5 authentication entries integer (count) lower is better warning > 0
PGHF11-003 Public schema CREATE privilege boolean pass = false warning when true
PGHF11-004 Privileged non-superuser roles integer (count) none — informational audit list for human review
PGHF11-005 Connection logging jsonb none yet — jsonb result needs a custom evaluator
PGHF11-006 pgaudit extension boolean pass = true info when false
PGHF11-007 Non-superuser login role count integer (count) none — informational audit list for human review
PGHF11-008 SSL certificate paths jsonb none yet — jsonb result needs a custom evaluator
PGHF11-009 Superuser login roles as % of all login roles numeric (percent) lower is better critical > 50 · warning > 20
PGHF11-010 password_encryption is scram-sha-256 boolean pass = true warning when false
PGHF11-011 Unencrypted client connections integer (count) lower is better warning > 0
PGHF11-012 MAINTAIN privilege / pg_maintain role audit integer (count) none — informational audit list for human review

C12 — pgEdge / Spock Cluster

Check Name Result Judged as Default threshold
PGHF12-001 Node list consistency boolean pass = true critical when false
PGHF12-002 Spock subscriptions enabled jsonb none yet — jsonb result needs a custom evaluator
PGHF12-003 Spock worker status integer (count) higher is better warning < 1
PGHF12-004 Spock apply lag jsonb custom evaluator — pghf.evaluate_c12_004_apply_lag()
PGHF12-005 Spock exception log integer (count) lower is better critical > 100000 · warning > 10000
PGHF12-006 Spock resolutions integer (count) none — a high count just means conflict resolution is firing; not necessarily a problem
PGHF12-007 Oldest unresolved spock exception age numeric (days) lower is better warning > 7
PGHF12-008 pg_cron extension boolean none — presence is a deployment choice; no universal pass value
PGHF12-009 Spock WAL slots jsonb none yet — jsonb result needs a custom evaluator
PGHF12-010 hot_standby_feedback text none yet — text result needs a custom evaluator
PGHF12-011 wal_level text none yet — text result needs a custom evaluator
PGHF12-012 Table parity boolean pass = true critical when false
PGHF12-013 Index parity boolean pass = true warning when false
PGHF12-014 Sequence increment collision boolean pass = false critical when true
PGHF12-015 Spock forward_origins jsonb none yet — jsonb result needs a custom evaluator
PGHF12-016 Replication set membership jsonb none yet — jsonb result needs a custom evaluator
PGHF12-017 Spock sync state jsonb none yet — jsonb result needs a custom evaluator
PGHF12-018 Row count sampling boolean pass = true warning when false
PGHF12-019 Spock local node registration jsonb none yet — jsonb result needs a custom evaluator
PGHF12-020 Spock lag tracker jsonb none yet — jsonb result needs a custom evaluator
PGHF12-021 Spock queue depth integer (count) lower is better custom evaluator — pghf.evaluate_c12_021_queue_depth()
PGHF12-022 Total spock channel conflicts integer (count) lower is better warning > 1000
PGHF12-023 Worst spock replication progress lag integer (bytes) lower is better critical > 524288000
PGHF12-024 Worst logical slot spill size integer (bytes) lower is better critical > 2097152000 · warning > 524288000
PGHF12-025 Oldest unresolved spock exception age (retry/crash-loop) integer (minutes) lower is better warning > 60

C13 — OS & Resource-Level Checks

Check Name Result Judged as Default threshold
PGHF13-001 Checkpoint sync time numeric (milliseconds) lower is better none — cumulative-since-reset counter; a flat cutoff would eventually fire regardless of current health; it needs a baseline evaluator
PGHF13-002 pg_stat_io evictions integer (count) lower is better none — cumulative-since-reset counter; a flat cutoff would eventually fire regardless of current health; it needs a baseline evaluator
PGHF13-003 maxwritten_clean integer (count) lower is better none — cumulative-since-reset counter; a flat cutoff would eventually fire regardless of current health; it needs a baseline evaluator
PGHF13-004 huge_pages setting text none yet — text result needs a custom evaluator
PGHF13-005 Temp file spill jsonb none yet — jsonb result needs a custom evaluator
PGHF13-006 Query conflicts integer (count) lower is better none — cumulative-since-reset counter; a flat cutoff would eventually fire regardless of current health; it needs a baseline evaluator
PGHF13-007 max_connections advisory integer (count) lower is better warning > 500 · info > 200
PGHF13-008 Postmaster uptime integer (seconds) higher is better critical < 300 · warning < 900 · info < 3600
PGHF13-009 Standby restartpoint completion numeric (percent) higher is better warning < 90
PGHF13-010 Async I/O method text none — informational only — no claim about which io_method is correct for a given platform

C14 — WAL Growth & Generation Rate

Check Name Result Judged as Default threshold
PGHF14-001 pg_wal directory size integer (bytes) lower is better critical > 53687091200 · warning > 21474836480
PGHF14-002 WAL generation rate numeric (bytes/second) lower is better custom evaluator — pghf.evaluate_c14_002_wal_rate_baseline()
PGHF14-003 WAL statistics summary jsonb none yet — jsonb result needs a custom evaluator
PGHF14-004 Full-page write ratio numeric (percent) lower is better warning > 40
PGHF14-005 Top WAL-generating tables integer (count) none — the scalar is a population count; the real signal is the top-N detail list
PGHF14-006 WAL compression text none yet — text result needs a custom evaluator
PGHF14-007 wal_level vs logical replication usage jsonb none yet — jsonb result needs a custom evaluator
PGHF14-008 WAL segment count integer (count) lower is better warning > 1000
PGHF14-009 WAL archiver status jsonb custom evaluator — pghf.evaluate_c14_010_archiver_status()
PGHF14-010 UNLOGGED tables advisory integer (count) none — UNLOGGED tables are often an intentional choice
PGHF14-011 Forced checkpoint rate integer (count) lower is better critical > 20
PGHF14-012 Long transactions blocking WAL recycle integer (seconds) lower is better critical > 300
PGHF14-013 WAL accumulation since checkpoint numeric (bytes) lower is better critical > 2147483648 · warning > 1073741824

C15 — Replication Health

Check Name Result Judged as Default threshold
PGHF15-001 WAL receiver last-message age numeric (seconds) lower is better warning > 300
PGHF15-002 Inactive physical replication slots integer (count) lower is better critical > 0
PGHF15-003 Standby query conflicts by type jsonb none yet — jsonb result needs a custom evaluator