Search PostgreSQL documentation
PG 18 · Browse by category, or enter a name or keyword
Category index908
pg_stat_filepg_stat_file
System Administration Functions
10
Return information about a file.
pg_stat_file ( filename text[, missing_ok boolean] ) → record Return information about a file.
11
Return info…Functions · System Administration Functions
pg_stat_get_activitypg_stat_get_activity ( integer ) → setof record Returns a record of information about the backend with the specified process ID, or one record for each active backend in the system if NULL i…The Cumulative Statistics System › Statistics Functions
pg_stat_get_backend_activitypg_stat_get_backend_activity ( integer ) → text Returns the text of this backend's most recent query.The Cumulative Statistics System › Statistics Functions
pg_stat_get_backend_activity_startpg_stat_get_backend_activity_start ( integer ) → timestamp with time zone Returns the time when the backend's most recent query was started.The Cumulative Statistics System › Statistics Functions
pg_stat_get_backend_client_addrpg_stat_get_backend_client_addr ( integer ) → inet Returns the IP address of the client connected to this backend.The Cumulative Statistics System › Statistics Functions
pg_stat_get_backend_client_portpg_stat_get_backend_client_port ( integer ) → integer Returns the TCP port number that the client is using for communication.The Cumulative Statistics System › Statistics Functions
pg_stat_get_backend_dbidpg_stat_get_backend_dbid ( integer ) → oid Returns the OID of the database this backend is connected to.The Cumulative Statistics System › Statistics Functions
pg_stat_get_backend_idsetpg_stat_get_backend_idset () → setof integer Returns the set of currently active backend ID numbers.The Cumulative Statistics System › Statistics Functions
pg_stat_get_backend_iopg_stat_get_backend_io ( integer ) → setof record Returns I/O statistics about the backend with the specified process ID. The output fields are exactly the same as the ones in the pg_stat_io…The Cumulative Statistics System › Statistics Functions
pg_stat_get_backend_pidpg_stat_get_backend_pid ( integer ) → integer Returns the process ID of this backend.The Cumulative Statistics System › Statistics Functions
pg_stat_get_backend_startpg_stat_get_backend_start ( integer ) → timestamp with time zone Returns the time when this process was started.The Cumulative Statistics System › Statistics Functions
pg_stat_get_backend_subxactpg_stat_get_backend_subxact ( integer ) → record Returns a record of information about the subtransactions of the backend with the specified ID. The fields returned are subxact_count, which …The Cumulative Statistics System › Statistics Functions
pg_stat_get_backend_useridpg_stat_get_backend_userid ( integer ) → oid Returns the OID of the user logged into this backend.The Cumulative Statistics System › Statistics Functions
pg_stat_get_backend_wait_eventpg_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.The Cumulative Statistics System › Statistics Functions
pg_stat_get_backend_wait_event_typepg_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.The Cumulative Statistics System › Statistics Functions
pg_stat_get_backend_walpg_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 vie…The Cumulative Statistics System › Statistics Functions
pg_stat_get_backend_xact_startpg_stat_get_backend_xact_start ( integer ) → timestamp with time zone Returns the time when the backend's current transaction was started.The Cumulative Statistics System › Statistics Functions
pg_stat_get_snapshot_timestamppg_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 t…The Cumulative Statistics System › Statistics Functions
pg_stat_get_xact_blocks_fetchedpg_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 Cumulative Statistics System › Statistics Functions
pg_stat_get_xact_blocks_hitpg_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).The Cumulative Statistics System › Statistics Functions
pg_stat_resetpg_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 t…The Cumulative Statistics System › Statistics Functions
pg_stat_reset_backend_statspg_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 u…The Cumulative Statistics System › Statistics Functions
pg_stat_reset_replication_slotpg_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. Th…The Cumulative Statistics System › Statistics Functions
pg_stat_reset_sharedpg_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 …The Cumulative Statistics System › Statistics Functions
pg_stat_reset_single_function_counterspg_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…The Cumulative Statistics System › Statistics Functions
pg_stat_reset_single_table_counterspg_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 …The Cumulative Statistics System › Statistics Functions
pg_stat_reset_slrupg_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 …The Cumulative Statistics System › Statistics Functions
pg_stat_reset_subscription_statspg_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 fo…The Cumulative Statistics System › Statistics Functions
pg_statistics_obj_is_visiblepg_statistics_obj_is_visible
System Information Functions And Operators
10
is statistics object visible in search path
pg_statistics_obj_is_visible ( stat_oid ) → boolean is statistics objec…Functions · System Information Functions And Operators
pg_stop_backuppg_stop_backup
System Administration Functions
10
Finish performing exclusive on-line backup (restricted to superusers by default, but other users can be granted EXECUTE to run the function)…Functions · System Administration Functions
pg_switch_walpg_switch_wal
System Administration Functions
10
Force switch to a new write-ahead log file (restricted to superusers by default, but other users can be granted EXECUTE to run the function)
…Functions · System Administration Functions
pg_switch_xlogpg_switch_xlog
System Administration Functions
9.0
Force switch to a new transaction log file
pg_switch_xlog ( ) → text Force switch to a new transaction log file
9.1
Force switch to a new t…Functions · System Administration Functions
pg_sync_replication_slotspg_sync_replication_slots
System Administration Functions
17
Synchronize the logical failover replication slots from the primary server to the standby server. This function can only be execu…Functions · System Administration Functions
pg_table_is_visiblepg_table_is_visible
System Information Functions And Operators
10
is table visible in search path
pg_table_is_visible ( table_oid ) → boolean is table visible in search path
11
12
13
Is tabl…Functions · System Information Functions And Operators
pg_table_sizepg_table_size
System Administration Functions
10
Disk space used by the specified table, excluding indexes (but including TOAST, free space map, and visibility map)
pg_table_size ( regclass …Functions · System Administration Functions
pg_tablespace_databasespg_tablespace_databases
System Information Functions And Operators
10
get the set of database OIDs that have objects in the tablespace
pg_tablespace_databases ( tablespace_oid ) → setof oid …Functions · System Information Functions And Operators
pg_tablespace_locationpg_tablespace_location
System Information Functions And Operators
10
get the path in the file system that this tablespace is located in
pg_tablespace_location ( tablespace_oid ) → text get t…Functions · System Information Functions And Operators
pg_tablespace_sizepg_tablespace_size
System Administration Functions
10
Disk space used by the tablespace with the specified OID
pg_tablespace_size ( oid ) → bigint Disk space used by the tablespace with the …Functions · System Administration Functions
pg_terminate_backendpg_terminate_backend
System Administration Functions
10
Terminate a backend. This is also allowed if the calling role is a member of the role whose backend is being terminated or the calling…Functions · System Administration Functions
pg_total_relation_sizepg_total_relation_size
System Administration Functions
10
Total disk space used by the specified table, including all indexes and TOAST data
pg_total_relation_size ( regclass ) → bigint Tota…Functions · System Administration Functions
More results
Find definitions in the PostgreSQL manuals, reference library, and extension catalogue.
pg17: choose a version ex: extensions only ↑↓ select ↵ open