Get PG 19 stats status
get_pg19_stats_statusCheck whether PostgreSQL 19's pg_stat_lock and pg_stat_recovery views are usable on the server, returning availability status, version details, and diagnostic guidance.
Instructions
Report whether PG 19's pg_stat_lock and pg_stat_recovery views are usable on this server. Never raises — driver-level errors surface as available=false. On PG < 19 returns available=false with a diagnostic pointing the agent at find_blocking_chains / pg_stat_replication. Returns an object with available (bool), server_version_num (int), server_version, has_pg_stat_lock (bool), has_pg_stat_recovery (bool), and detail (guidance string).
Example: get_pg19_stats_status()
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | No | Optional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| detail | Yes | ||
| available | Yes | ||
| server_version | Yes | ||
| has_pg_stat_lock | Yes | ||
| server_version_num | Yes | ||
| has_pg_stat_recovery | Yes |