Search PostgreSQL documentation
PG 18 · Browse by category, or enter a name or keyword
Popular entries9997
pg_stat_get_backend_wait_event( integer ) → text Returns the wait event name if this backend is currently waiting, otherwise NULL. See Table 27.5 through Table 27.13.
pg_stat_get_backend_wait_event_type( integer ) → text Returns the wait event type name if this backend is currently waiting, otherwise NULL. See Table 27.4 for details.
pg_stat_get_backend_wal( integer ) → record Returns WAL statistics about the backend with the specified process ID. The output fields are exactly the same as the ones in the pg_stat_wal view. The function does not…
pg_stat_get_backend_xact_start( integer ) → timestamp with time zone Returns the time when the backend's current transaction was started.
pg_stat_get_snapshot_timestamp() → timestamp with time zone Returns the timestamp of the current statistics snapshot, or NULL if no statistics snapshot has been taken. A snapshot is taken the first time cumulative statis…
pg_stat_get_xact_blocks_fetched( oid ) → bigint Returns the number of block read requests for table or index, in the current transaction. This number minus pg_stat_get_xact_blocks_hit gives the number of kernel read() cal…
pg_stat_get_xact_blocks_hit( oid ) → bigint Returns the number of block read requests for table or index, in the current transaction, found in cache (not triggering kernel read() calls).
pg_stat_gssapiThe pg_stat_gssapi view will contain one row per backend, showing information about GSSAPI usage on this connection. It can be joined to pg_stat_activity or pg_stat_replication on the pid co…
pg_stat_insightsQuery planning/execution statistics with replication, index, trend, and contention analysis.
query statistics performance monitoring
pg_stat_insights
Monitoring
pg_stat_ioThe pg_stat_io view will contain one row for each combination of backend type, target I/O object, and I/O context, showing cluster-wide I/O statistics. Combinations which do not make sense a…
pg_stat_kcacheKernel statistics gathering
pg_stat_kcache
Monitoring
pg_stat_logTrack cumulative PostgreSQL log message statistics by backend, database, user, level, and SQLSTATE.
pg_stat_log
Monitoring
pg_stat_monitorThe pg_stat_monitor is a PostgreSQL Query Performance Monitoring tool, based on PostgreSQL contrib module pg_stat_statements. pg_stat_monitor provides aggregated statistics, client informati…
pg_stat_plansTrack per-plan call counts, execution times, and example EXPLAIN texts.
pg_stat_plans
Monitoring
pg_stat_query_plansTrack SQL statement and execution-plan statistics in shared memory
statistics query plans
pg_stat_query_plans
Monitoring
pg_stat_recovery_prefetchThe pg_stat_recovery_prefetch view will contain only one row. The columns wal_distance, block_distance and io_depth show current values, and the other columns show cumulative counters that c…
pg_stat_replicationThe pg_stat_replication view will contain one row per WAL sender process, showing statistics about replication to that sender's connected standby server. Only directly connected standbys are…
pg_stat_replication_slotsThe pg_stat_replication_slots view will contain one row per logical replication slot, showing statistics about its usage.
Table 27.15. pg_stat_replication_slots View Column Type Description …
pg_stat_reset() → void Resets all statistics counters for the current database to zero. This function is restricted to superusers by default, but other users can be granted EXECUTE to run the function.
pg_stat_reset_backend_stats( integer ) → void Resets statistics for a single backend with the specified process ID to zero. This function is restricted to superusers by default, but other users can be granted EXECUTE …
pg_stat_reset_replication_slot( text ) → void Resets statistics of the replication slot defined by the argument. If the argument is NULL, resets statistics for all the replication slots. This function is restricted to su…
pg_stat_reset_shared( [ target text DEFAULT NULL ] ) → void Resets some cluster-wide statistics counters to zero, depending on the argument. target can be: archiver: Reset all the counters shown in the pg_stat_…
pg_stat_reset_single_function_counters( oid ) → void Resets statistics for a single function in the current database to zero. This function is restricted to superusers by default, but other users can be granted EXECUTE to run th…
pg_stat_reset_single_table_counters( oid ) → void Resets statistics for a single table or index in the current database or shared across all databases in the cluster to zero. This function is restricted to superusers by defau…
pg_stat_reset_slru( [ target text DEFAULT NULL ] ) → void Resets statistics to zero for a single SLRU cache, or for all SLRUs in the cluster. If target is NULL or is not specified, all the counters shown in t…
pg_stat_reset_subscription_stats( oid ) → void Resets statistics for a single subscription shown in the pg_stat_subscription_stats view to zero. If the argument is NULL, reset statistics for all subscriptions. This functio…
pg_stat_slruPostgreSQL accesses certain on-disk information via SLRU (simple least-recently-used) caches. The pg_stat_slru view will contain one row for each tracked SLRU cache, showing statistics about…
pg_stat_sql_plansTrack execution statistics by normalized SQL query and plan ID.
pg_stat_statements plan-stats query-stats shared-preload
pg_stat_sql_plans
Monitoring
pg_stat_ssi_failuresCluster-wide counter for PostgreSQL SSI serialization failures.
monitoring serialization-failures shared-preload ssi
ssi_failures
Monitoring
pg_stat_sslThe pg_stat_ssl view will contain one row per backend or WAL sender process, showing statistics about SSL usage on this connection. It can be joined to pg_stat_activity or pg_stat_replicatio…
pg_stat_statementstrack statistics of SQL planning and execution
The pg_stat_statements module provides a means for tracking planning and execution statistics of all SQL statements executed by a server.
The m…
pg_stat_statementsAllow the queries of CREATE TABLE AS and DECLARE to be tracked by pg_stat_statements (Anthonin Bonnefoy) § They are also now assigned query ids. Allow the parameterization of SET values in p…
pg_stat_statements — track statistics of SQL planning and executionThe pg_stat_statements module provides a means for tracking planning and execution statistics of all SQL statements executed by a server.
The module must be loaded by adding pg_stat_statemen…
pg_stat_statements2Track SQL execution statistics using a PostgreSQL 9.4 pg_stat_statements derivative integrated with sql_firewall
query-statistics sql-firewall statistics
pg_stat_statements2
Monitoring
pg_stat_subscriptionTable 27.18. pg_stat_subscription View Column Type Description subid oid OID of the subscription subname name Name of the subscription worker_type text Type of the subscription worker proces…
pg_stat_subscription_statsThe pg_stat_subscription_stats view will contain one row per subscription.
Table 27.19. pg_stat_subscription_stats View Column Type Description subid oid OID of the subscription subname name…
pg_stat_sysinfoQuery host load, CPU, memory, swap, and disk statistics from PostgreSQL, with optional shared-memory caching.
monitoring pgrx system-statistics
pg_stat_sysinfo
Monitoring
pg_stat_usagetrack usage statistics of stored procedure calls
pg_stat_usage
Monitoring
pg_stat_user_functionsThe pg_stat_user_functions view will contain one row for each tracked function, showing statistics about executions of that function. The track_functions parameter controls exactly which fun…
pg_stat_walThe pg_stat_wal view will always have a single row, containing data about WAL activity of the cluster.
Table 27.26. pg_stat_wal View Column Type Description wal_records bigint Total number o…
More results
Find definitions in the PostgreSQL manuals, reference library, and extension catalogue.
Searching every version by default. Manual pages are indexed for PostgreSQL 10–20; the reference library and extension catalogue are not version-bound.
all: every version pg17: one version ex: extensions only ↑↓ select ↵ open