PostgreSQL 文档检索
PG 18 · 按类别浏览,或输入名称与关键词
分类索引1772
pg_stat_get_backend_idsetpg_stat_get_backend_idset () → setof integer 返回当前活动后端 ID 号的集合。累积统计系统 › 统计函数
pg_stat_get_backend_iopg_stat_get_backend_io ( integer ) → setof record 返回指定进程 ID 的后端的 I/O 统计信息。输出字段与 pg_stat_io 视图中的字段完全相同。 该函数不返回检查点进程、后台写入器、启动进程和自动清理启动器的 I/O 统计信息,因为这些统计信息已显示在 pg_stat_io 视图中,而且每种进程都只有一个。累积统计系统 › 统计函数
pg_stat_get_backend_pidpg_stat_get_backend_pid ( integer ) → integer 返回此后端进程ID。累积统计系统 › 统计函数
pg_stat_get_backend_startpg_stat_get_backend_start ( integer ) → timestamp with time zone 返回该进程开始的时间。累积统计系统 › 统计函数
pg_stat_get_backend_subxactpg_stat_get_backend_subxact ( integer ) → record 返回指定 ID 的后端进程的子事务信息记录。返回的字段包括 subxact_count(该后端进程子事务缓存中的子事务数量)以及 subxact_overflow(指示该后端进程的子事务缓存是否已溢出)。累积统计系统 › 统计函数
pg_stat_get_backend_useridpg_stat_get_backend_userid ( integer ) → oid 返回登录到此后端的用户的OID。累积统计系统 › 统计函数
pg_stat_get_backend_wait_eventpg_stat_get_backend_wait_event ( integer ) → text 如果后端当前正在等待,则返回等待事件名称,否则为空值。请参阅表 27.5到表 27.13。累积统计系统 › 统计函数
pg_stat_get_backend_wait_event_typepg_stat_get_backend_wait_event_type ( integer ) → text 如果后端当前正在等待,则返回等待事件类型名称,否则返回空值。请参阅表 27.4。累积统计系统 › 统计函数
pg_stat_get_backend_walpg_stat_get_backend_wal ( integer ) → record 返回指定进程 ID 的后端的 WAL 统计信息。输出字段与 pg_stat_wal 视图中的字段完全相同。 该函数不会返回检查点进程、后台写入器、启动进程和自动清理启动器的 WAL 统计信息。累积统计系统 › 统计函数
pg_stat_get_backend_xact_startpg_stat_get_backend_xact_start ( integer ) → timestamp with time zone 返回后端当前事务开始的时间。累积统计系统 › 统计函数
pg_stat_get_snapshot_timestamppg_stat_get_snapshot_timestamp () → timestamp with time zone 返回当前统计快照的时间戳;如果尚未获取统计快照,则返回 NULL。如果 stats_fetch_consistency 设置为 snapshot,则会在事务中第一次访问累积统计信息时获取快照。累积统计系统 › 统计函数
pg_stat_get_xact_blocks_fetchedpg_stat_get_xact_blocks_fetched ( oid ) → bigint 返回当前事务中表或索引的块读取请求次数。这个数字减去 pg_stat_get_xact_blocks_hit给出了内核read()调用的次数;实际的物理读取次数通常较低,这是由于内核级别的缓冲。累积统计系统 › 统计函数
pg_stat_get_xact_blocks_hitpg_stat_get_xact_blocks_hit ( oid ) → bigint 返回在当前事务中在缓存中找到的表或索引的块读取请求次数(不触发内核read()调用)。累积统计系统 › 统计函数
pg_stat_resetpg_stat_reset () → void 将当前数据库的所有统计计数器重置为零。 默认情况下,此函数仅限超级用户使用,但可以授予其他用户 EXECUTE 权限来运行该函数。累积统计系统 › 统计函数
pg_stat_reset_backend_statspg_stat_reset_backend_stats ( integer ) → void 将指定进程 ID 的单个后端进程的统计信息重置为零。 默认情况下,此函数仅限超级用户使用,但可以授予其他用户 EXECUTE 权限来运行该函数。累积统计系统 › 统计函数
pg_stat_reset_replication_slotpg_stat_reset_replication_slot ( text ) → void 重置由参数定义的复制槽的统计信息。如果参数为NULL,则重置所有复制槽的统计信息。 默认情况下,此函数仅限超级用户使用,但可以授予其他用户 EXECUTE 权限来运行该函数。累积统计系统 › 统计函数
pg_stat_reset_sharedpg_stat_reset_shared ( [ target text DEFAULT NULL ] ) → void 根据参数将一些集簇范围的统计计数器重置为零。target 可以是: archiver:重置 pg_stat_archiver 视图中显示的所有计数器。 bgwriter:重置 pg_stat_bgwriter 视图中显示的所有计数器。 checkpointe…累积统计系统 › 统计函数
pg_stat_reset_single_function_counterspg_stat_reset_single_function_counters ( oid ) → void 将当前数据库中单个函数的统计信息重置为零。 默认情况下,此函数仅限超级用户使用,但可以授予其他用户 EXECUTE 权限来运行该函数。累积统计系统 › 统计函数
pg_stat_reset_single_table_counterspg_stat_reset_single_table_counters ( oid ) → void 将单个表或索引的统计信息重置为零;该对象可以位于当前数据库中,也可以由集簇中的所有数据库共享。 默认情况下,此函数仅限超级用户使用,但可以授予其他用户 EXECUTE 权限来运行该函数。累积统计系统 › 统计函数
pg_stat_reset_slrupg_stat_reset_slru ( [ target text DEFAULT NULL ] ) → void 将单个 SLRU 缓存或集簇中所有 SLRU 的统计信息重置为零。如果 target 为 NULL 或未指定,则重置 pg_stat_slru 视图中所有 SLRU 缓存的全部计数器。参数可以为 commit_timestamp、multixact_membe…累积统计系统 › 统计函数
pg_stat_reset_subscription_statspg_stat_reset_subscription_stats ( oid ) → void 重置pg_stat_subscription_stats视图中显示的单个订阅的统计信息为零。如果参数是NULL,则重置所有订阅的统计信息。 默认情况下,此函数仅限超级用户使用,但可以授予其他用户 EXECUTE 权限来运行该函数。累积统计系统 › 统计函数
pg_statistics_obj_is_visible统计对象在搜索路径中可见吗?
Is statistics object visible in search path?
pg_statistics_obj_is_visible ( stat oid ) → boolean
系统信息函数和操作符函数 · 系统信息函数和操作符
pg_stop_backup结束排他或非排他的在线备份。
Finishes performing an exclusive or non-exclusive on-line backup.
pg_stop_backup ( exclusive boolean [, wait_for_archive boolean ] ) → setof record ( lsn pg_lsn, labelfile tex…函数 · 系统管理函数
pg_switch_wal强制服务器切换到新的预写式日志文件,使当前文件可以归档(假设正在使用连续归档)。
Forces the server to switch to a new write-ahead log file, which allows the current file to be archived (assuming you are using continuous archiving)…函数 · 系统管理函数
pg_switch_xlog强制切换到新的预写式日志文件(默认仅限超级用户,但可以向其他用户授予EXECUTE权限以运行此函数)
Force switch to a new transaction log file (restricted to superusers by default, but other users can be granted EXECUTE to run the function…函数 · 系统管理函数
pg_sync_replication_slots将逻辑故障切换复制槽从主库同步到备库。
Synchronize the logical failover replication slots from the primary server to the standby server.
pg_sync_replication_slots () → void
系统管理函数函数 · 系统管理函数
pg_table_is_visible表在搜索路径中可见吗?(这适用于所有类型的关系,包括视图、物化视图、索引、序列和外部表。
Is table visible in search path? (This works for all types of relations, including views, materialized views, indexes, sequences and foreign tabl…函数 · 系统信息函数和操作符
pg_table_size计算指定表所使用的磁盘空间,不包括索引(但包括其 TOAST 表(如有)、空闲空间映射和可见性映射)。
Computes the disk space used by the specified table, excluding indexes (but including its TOAST table if any, free space map, and visibili…函数 · 系统管理函数
pg_tablespace_databases返回在指定表空间中存储了对象的数据库 OID 集合。
Returns the set of OIDs of databases that have objects stored in the specified tablespace.
pg_tablespace_databases ( tablespace oid ) → setof oid
系统信息函数和操作符函数 · 系统信息函数和操作符
pg_tablespace_location返回表空间所在的文件系统路径。
Returns the file system path that this tablespace is located in.
pg_tablespace_location ( tablespace oid ) → text
系统信息函数和操作符函数 · 系统信息函数和操作符
pg_tablespace_size计算具有指定名称或OID的表空间中使用的总磁盘空间。
Computes the total disk space used in the tablespace with the specified name or OID.
pg_tablespace_size ( name ) → bigint
pg_tablespace_size ( oid ) → bigint
系统管理函…函数 · 系统管理函数
pg_terminate_backend终止具有指定进程ID的后端进程的会话。
Terminates the session whose backend process has the specified process ID.
pg_terminate_backend ( pid integer, timeout bigint DEFAULT 0 ) → boolean
系统管理函数函数 · 系统管理函数
pg_total_relation_size计算指定表所使用的总磁盘空间,包括所有索引和TOAST数据。
Computes the total disk space used by the specified table, including all indexes and TOAST data.
pg_total_relation_size ( regclass ) → bigint
系统管理函数函数 · 系统管理函数
pg_trigger_depth返回PostgreSQL触发器的当前嵌套层级(如果不是从触发器内部直接或间接调用,则为 0)。
Returns the current nesting level of PostgreSQL triggers (0 if not called, directly or indirectly, from inside a trigger).
pg_trigger_depth ()…函数 · 系统信息函数和操作符
pg_try_advisory_lock尝试获取一个排他的会话级咨询锁。
Obtains an exclusive session-level advisory lock if available.
pg_try_advisory_lock ( key bigint ) → boolean
pg_try_advisory_lock ( key1 integer, key2 integer ) → boolean
系统…函数 · 系统管理函数
pg_try_advisory_lock_shared尝试获取一个共享的会话级咨询锁。
Obtains a shared session-level advisory lock if available.
pg_try_advisory_lock_shared ( key bigint ) → boolean
pg_try_advisory_lock_shared ( key1 integer, key2 integer ) → …函数 · 系统管理函数
pg_try_advisory_xact_lock尝试获取一个排他的事务级咨询锁。
Obtains an exclusive transaction-level advisory lock if available.
pg_try_advisory_xact_lock ( key bigint ) → boolean
pg_try_advisory_xact_lock ( key1 integer, key2 integer …函数 · 系统管理函数
pg_try_advisory_xact_lock_shared尝试获取一个共享的事务级咨询锁。
Obtains a shared transaction-level advisory lock if available.
pg_try_advisory_xact_lock_shared ( key bigint ) → boolean
pg_try_advisory_xact_lock_shared ( key1 integer, key…函数 · 系统管理函数
pg_ts_config_is_visible全文检索配置是否在搜索路径中可见?
Is text search configuration visible in search path?
pg_ts_config_is_visible ( config oid ) → boolean
系统信息函数和操作符函数 · 系统信息函数和操作符
pg_ts_dict_is_visible全文检索词典是否在搜索路径中可见?
Is text search dictionary visible in search path?
pg_ts_dict_is_visible ( dict oid ) → boolean
系统信息函数和操作符函数 · 系统信息函数和操作符
更多结果
输入名称或关键词,从 PostgreSQL 手册与扩展目录中直接找到定义。
pg17: 限定版本 ex: 只搜扩展 ↑↓ 选择 ↵ 打开