---
title: "New system views in PostgreSQL 19"
description: "PostgreSQL 19 (in beta) adds four system views, and three of them get hands-on demos. pg_stat_lock gives cumulative per-locktype wait counts, wait time and fastpath_exceeded counters, though waits only count once they pass deadlock_timeout. pg_stat_recovery returns standby replay state as one atomic, consistent snapshot. pg_stat_autovacuum_scores shows the new score-based autovacuum prioritization, tunable through five weight parameters."
url: "https://swe.quest/articles/new-system-views-in-postgresql-19-ae28d882e3a54409"
canonical: "https://clickhouse.com/blog/postgres-19-new-system-views"
source: "ClickHouse"
published: "2026-09-01"
difficulty: "medium"
kind: "Deep dive"
reading_minutes: 12
tags: ["postgres","observability","databases","replication"]
---

# New system views in PostgreSQL 19

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2026-09-01, 12 min read, Deep dive. Original: [https://clickhouse.com/blog/postgres-19-new-system-views](https://clickhouse.com/blog/postgres-19-new-system-views)

## Summary

PostgreSQL 19 (in beta) adds four system views, and three of them get hands-on demos. pg\_stat\_lock gives cumulative per-locktype wait counts, wait time and fastpath\_exceeded counters, though waits only count once they pass deadlock\_timeout. pg\_stat\_recovery returns standby replay state as one atomic, consistent snapshot. pg\_stat\_autovacuum\_scores shows the new score-based autovacuum prioritization, tunable through five weight parameters. Worked SQL examples cover lock contention, fast-path spill on a 140-partition table (alongside the new max\_locks\_per\_transaction default of 128) and how autovacuum scores are computed from thresholds.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [Observability](https://swe.quest/tags/observability.md) (Reliability & operations)
- [Databases](https://swe.quest/tags/databases.md) (Data & databases)
- [Replication](https://swe.quest/tags/replication.md) (Distributed systems)

## Prerequisites

- PostgreSQL administration ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))
- PostgreSQL locking ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))
- autovacuum basics
- streaming replication ([easy posts on Stream processing](https://swe.quest/tags/stream-processing.md?difficulty=easy))

## Keywords

PostgreSQL 19, pg\_stat\_lock, pg\_stat\_recovery, pg\_stat\_autovacuum\_scores, pg\_dsm\_registry\_allocations, autovacuum, max\_locks\_per\_transaction

## Related posts

- [What's New with Monitoring in PostgreSQL 19](https://swe.quest/articles/what-s-new-with-monitoring-in-postgresql-19-e4c0bc9dee606e4c.md): ClickHouse · 2026-08-18 · Medium · 8 min read · PostgreSQL, Observability, Databases
  PostgreSQL 19 (in beta) brings a batch of monitoring improvements. log\_lock\_waits is now on by default, log\_min\_messages accepts per-process-type levels, and autoanalyze gets its own log\_autoanalyze\_min\_duration threshold.
- [PostgreSQL 19 on ClickHouse Managed Postgres, from day one](https://swe.quest/articles/postgresql-19-on-clickhouse-managed-postgres-from-day-one-f842fb2eaa8035d3.md): ClickHouse · 2026-11-24 · Medium · 12 min read · PostgreSQL, Replication, Deployment, Databases
  PostgreSQL 19 has been generally available on ClickHouse Managed Postgres since its November 2026 release day.
- [Postgres 19 is out: try it on Neon](https://swe.quest/articles/postgres-19-is-out-try-it-on-neon-e6c41c3a4f2e92c9.md): Neon · 2026-11-19 · Medium · 12 min read · PostgreSQL, Replication, Query engines, Databases
  Postgres 19 is an operations-focused release that adds REPACK (CONCURRENTLY) for online table rebuilding and clustering via logical decoding, pg\_plan\_advice/pg\_stash\_advice for stabilizing bad plans by query ID, parallel autovacuum with priority scoring, WAIT FOR LSN for read-your-writes on replicas, and logical replication sequence sync.
- [Postgres Support Recap: Investigating Postgres Query Performance](https://swe.quest/articles/postgres-support-recap-investigating-postgres-query-performance-82d2d3f876d71410.md): Neon · 2024-02-29 · Medium · 9 min read · PostgreSQL, Performance engineering, SQL, Observability
  Three starting points for diagnosing slow Postgres queries: use pg\_stat\_statements to find long-running queries by mean execution time and then EXPLAIN ANALYZE them, check the cache hit ratio (in Neon via the neon\_stat\_file\_cache view, since Neon extends shared buffers with a local file cache), and look for table and index bloat caused by MVCC dead tuples.
- [Debug your Postgres from the terminal: a tour of \`neon inspect db\`](https://swe.quest/articles/debug-your-postgres-from-the-terminal-a-tour-of-neon-inspect-db-388ae9813e34917e.md): Neon · 2026-07-22 · Medium · 10 min read · PostgreSQL, Observability, Developer tools, Performance engineering, Replication
  \`neon inspect db\` adds fourteen read-only Postgres diagnostic subcommands to the Neon CLI, each running one curated query against Postgres statistics and catalog views (table/index sizes, bloat, unused indexes, seq scans, long-running queries, locks, pg\_stat\_statements outliers and calls, vacuum stats, replication slots, subscriptions).

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
