Part of #2530. Raised because much of what PostgreSQL observability needs is not in core — it is in extensions — and the amount we can collect varies per server rather than per engine.
The idea
We already have a capability vocabulary with two axes: engine kind (#2536) and engine edition (#2511). Both answer "this collector cannot run here, permanently, and here is why". Extensions are a third axis, and the only one where the answer is actionable: "this read needs pg_stat_kcache, which is not installed — here is how to install it" is advice a customer can act on today, unlike "your engine does not support this."
That framing matters. Detecting an absent extension and saying so turns a permanent gap into a setup step, which is the difference between a product that looks thin on PostgreSQL and one that tells you how to make it richer.
The extensions that would earn their place
pg_wait_sampling — the biggest one. Today PgWaitStatsCollector reads aurora_stat_system_waits(), so wait analysis exists only on Aurora. Every other PostgreSQL target — on-prem, self-managed, plain RDS — gets no wait data at all. pg_wait_sampling provides pg_wait_sampling_profile / _history / _current, samples at 10 ms by default, and — critically — attributes waits to queryid when paired with pg_stat_statements, which we already collect. That is the "which query waited on what" story, which is the core of how this product reasons about SQL Server, available on any PostgreSQL 14+. Requires shared_preload_libraries and runs a background worker.
auto_explain — plan capture, and see #2538. Confirmed available on Aurora and RDS via a custom DB cluster parameter group plus a writer reboot; Aurora's default cluster parameter group preloads only pg_stat_statements. So plan capture is not blocked on managed PostgreSQL after all — it is a customer configuration step we can detect and advise on.
pg_stat_kcache — real operating-system CPU and disk per query, on top of pg_stat_statements. Supported on Aurora (version-dependent), and it turns "this query has high total time" into "this query burned this much CPU and read this many bytes from disk", which is resource attribution we cannot otherwise get.
pgstattuple — exact bloat (see #2542, which discusses the estimate-versus-exact trade). An extension, so availability is per-server.
pg_buffercache — what is resident in shared buffers, by relation (see #2544).
pg_qualstats / HypoPG — predicate statistics and hypothetical indexes, the basis of index recommendations. Further out, and the PoWA stack is the reference implementation.
What to build first
Not any single extension — the detection and the vocabulary. A read that needs an absent extension should say which one, and how to enable it, in the same shape the engine axes already answer. Once that exists, each extension above becomes a self-contained collector that lights up where it can.
Doing it the other way round produces collectors that fail confusingly on servers that happen to lack a preload.
Note on the fleet this is being evaluated against
Dutchie runs Aurora, so pg_wait_sampling may not be reachable there (its Aurora support was not confirmed by the research and should be checked before it is planned around). auto_explain and pg_stat_kcache are. But the product ships to customers who self-host, and on-prem is where the extension story is richest — this issue exists so that is a deliberate capability rather than an accident of what one fleet happens to run.
Sources: pg_wait_sampling, PoWA — stats extensions, PostgreSQL Wiki — Monitoring, AWS — Working with extensions on Aurora PostgreSQL, pganalyze — auto_explain on Amazon RDS.
Part of #2530. Raised because much of what PostgreSQL observability needs is not in core — it is in extensions — and the amount we can collect varies per server rather than per engine.
The idea
We already have a capability vocabulary with two axes: engine kind (#2536) and engine edition (#2511). Both answer "this collector cannot run here, permanently, and here is why". Extensions are a third axis, and the only one where the answer is actionable: "this read needs
pg_stat_kcache, which is not installed — here is how to install it" is advice a customer can act on today, unlike "your engine does not support this."That framing matters. Detecting an absent extension and saying so turns a permanent gap into a setup step, which is the difference between a product that looks thin on PostgreSQL and one that tells you how to make it richer.
The extensions that would earn their place
pg_wait_sampling— the biggest one. TodayPgWaitStatsCollectorreadsaurora_stat_system_waits(), so wait analysis exists only on Aurora. Every other PostgreSQL target — on-prem, self-managed, plain RDS — gets no wait data at all.pg_wait_samplingprovidespg_wait_sampling_profile/_history/_current, samples at 10 ms by default, and — critically — attributes waits toqueryidwhen paired withpg_stat_statements, which we already collect. That is the "which query waited on what" story, which is the core of how this product reasons about SQL Server, available on any PostgreSQL 14+. Requiresshared_preload_librariesand runs a background worker.auto_explain— plan capture, and see #2538. Confirmed available on Aurora and RDS via a custom DB cluster parameter group plus a writer reboot; Aurora's default cluster parameter group preloads onlypg_stat_statements. So plan capture is not blocked on managed PostgreSQL after all — it is a customer configuration step we can detect and advise on.pg_stat_kcache— real operating-system CPU and disk per query, on top ofpg_stat_statements. Supported on Aurora (version-dependent), and it turns "this query has high total time" into "this query burned this much CPU and read this many bytes from disk", which is resource attribution we cannot otherwise get.pgstattuple— exact bloat (see #2542, which discusses the estimate-versus-exact trade). An extension, so availability is per-server.pg_buffercache— what is resident in shared buffers, by relation (see #2544).pg_qualstats/HypoPG— predicate statistics and hypothetical indexes, the basis of index recommendations. Further out, and the PoWA stack is the reference implementation.What to build first
Not any single extension — the detection and the vocabulary. A read that needs an absent extension should say which one, and how to enable it, in the same shape the engine axes already answer. Once that exists, each extension above becomes a self-contained collector that lights up where it can.
Doing it the other way round produces collectors that fail confusingly on servers that happen to lack a preload.
Note on the fleet this is being evaluated against
Dutchie runs Aurora, so
pg_wait_samplingmay not be reachable there (its Aurora support was not confirmed by the research and should be checked before it is planned around).auto_explainandpg_stat_kcacheare. But the product ships to customers who self-host, and on-prem is where the extension story is richest — this issue exists so that is a deliberate capability rather than an accident of what one fleet happens to run.Sources: pg_wait_sampling, PoWA — stats extensions, PostgreSQL Wiki — Monitoring, AWS — Working with extensions on Aurora PostgreSQL, pganalyze — auto_explain on Amazon RDS.