FUNCTION系统管理函数
pg_restore_relation_stats
更新表级统计信息。
Updates table-level statistics.
系统管理函数 引入 18 现存至 20 devel 1 条签名 0 次签名变更
- 分组
- 系统管理函数
- 签名数
- 1 条
- 引入版本
- 18
- 状态
- 现存
- 签名变更
- 未变过
- 本版来源
- 本站译文
版本轨迹
PostgreSQL 18 新增此函数,共 1 条签名。
签名
PostgreSQL 18 里 pg_restore_relation_stats 的 1 条签名,按上游手册顺序排列。参数名用斜体,类型用弱化色, 之后是返回类型。说明取自本站手册译文:标「沿用」的借用了另一版的译文,标「EN」的本站暂无译文、按英文原文显示。
-
pg_restore_relation_stats(VARIADICkwargs"any") →boolean
演化历史
相邻两个大版本之间的差异,新的在前。版本号链到该版的签名。
-
PostgreSQL 18 ← 17 新增此函数
PostgreSQL 18 起可用
签名矩阵
每条签名在给出了签名的 3 个版本里的存在情况;方格指向该版的签名。只在正文里提到此函数、没有给出签名的版本不列进来,上面的版本轨迹里仍然有它们。签名文本在 PostgreSQL 13 前后写法不同,跨越那一跳的同一条签名会显示成两行。
存在 不存在
同组函数
| 函数 | 签名 | 主签名 | 版本变动 | 最近变更 |
|---|---|---|---|---|
brin_desummarize_range |
1 | brin_desummarize_range ( index regclass, blockNumber bigint ) → void |
— | |
| 如果存在涵盖指定表块的页面范围摘要,则删除对应的 BRIN 索引元组。 | 现存 | |||
brin_summarize_new_values |
1 | brin_summarize_new_values ( index regclass ) → integer |
9.61 次 | |
| 扫描指定的BRIN索引以查找基表中当前尚未生成索引摘要的页面范围;对于任何这样的范围,它都通过扫描这些表页来创建一个新的摘要索引元组。 | 现存 | |||
brin_summarize_range |
1 | brin_summarize_range ( index regclass, blockNumber bigint ) → integer |
— | |
| 对覆盖给定块的页面范围执行摘要(如果尚未摘要)。 | 现存 | |||
current_setting基线 |
1 | current_setting ( setting_name text [, missing_ok boolean] ) → text |
9.61 次 | |
| 返回设置setting_name的当前值。 | 现存 | |||
gin_clean_pending_list |
1 | gin_clean_pending_list ( index regclass ) → bigint |
— | |
| 将指定 GIN 索引的“待处理”列表中的条目批量移入主 GIN 数据结构,从而清理该列表。 | 现存 | |||
pg_advisory_lock基线 |
2 | pg_advisory_lock ( key bigint ) → void |
— | |
| 获取一个排他的会话级咨询锁,如有必要则等待。 | 现存 | |||
pg_advisory_lock_shared基线 |
2 | pg_advisory_lock_shared ( key bigint ) → void |
— | |
| 获取一个共享的会话级咨询锁,如有必要则等待。 | 现存 | |||
pg_advisory_unlock基线 |
2 | pg_advisory_unlock ( key bigint ) → boolean |
— | |
| 释放以前获取的排他会话级咨询锁。 | 现存 | |||
pg_advisory_unlock_all基线 |
1 | pg_advisory_unlock_all () → void |
— | |
| 释放当前会话所持有的所有会话级咨询锁。 | 现存 | |||
pg_advisory_unlock_shared基线 |
2 | pg_advisory_unlock_shared ( key bigint ) → boolean |
— | |
| 释放以前获取的共享会话级咨询锁。 | 现存 | |||
pg_advisory_xact_lock |
2 | pg_advisory_xact_lock ( key bigint ) → void |
— | |
| 获取一个排他的事务级咨询锁,如有必要则等待。 | 现存 | |||
pg_advisory_xact_lock_shared |
2 | pg_advisory_xact_lock_shared ( key bigint ) → void |
— | |
| 获取一个共享的事务级咨询锁,如有必要则等待。 | 现存 | |||
pg_backup_start |
1 | pg_backup_start ( label text [, fast boolean] ) → pg_lsn |
— | |
| 准备服务器开始在线备份。 | 现存 | |||
pg_backup_start_time |
1 | pg_backup_start_time () → timestamp with time zone |
— | |
| 如果正在进行在线排他备份,返回其开始时间,否则返回 NULL。 | 于 15 移除 | |||
pg_backup_stop |
1 | pg_backup_stop ( [wait_for_archive boolean] ) → record ( lsn pg_lsn, labelfile text, spcmapfile text ) |
— | |
| 结束在线备份。 | 现存 | |||
pg_cancel_backend基线 |
1 | pg_cancel_backend ( pid integer ) → boolean |
— | |
| 取消具有指定进程ID的后端进程的会话的当前查询。 | 现存 | |||
pg_clear_attribute_stats |
1 | pg_clear_attribute_stats ( schemaname text, relname text, attname text, inherited boolean ) → void |
— | |
| 清除给定关系和属性的列级统计信息,就像该表是新创建的一样。 | 现存 | |||
pg_clear_extended_stats |
1 | pg_clear_extended_stats ( schemaname name, relname name, statistics_schemaname name, statistics_name name, inherited boolean ) → void |
— | |
| 清空扩展统计对象的数据,就像该对象是新建的一样。 | 现存 | |||
pg_clear_relation_stats |
1 | pg_clear_relation_stats ( schemaname text, relname text ) → void |
— | |
| 清除给定关系的表级统计信息,就像该表是新创建的一样。 | 现存 | |||
pg_collation_actual_version |
1 | pg_collation_actual_version ( oid ) → text |
— | |
| 返回当前安装在操作系统中的该排序规则对象的实际版本。 | 现存 | |||
pg_column_compression |
1 | pg_column_compression ( "any" ) → text |
— | |
| 显示用于压缩单个变长值的压缩算法。 | 现存 | |||
pg_column_size基线 |
1 | pg_column_size ( "any" ) → integer |
— | |
| 显示用于存储任何单个数据值的字节数。 | 现存 | |||
pg_column_toast_chunk_id |
1 | pg_column_toast_chunk_id ( "any" ) → oid8 |
201 次 | |
| 显示磁盘上经过TOAST处理的值的chunk_id。 | 现存 | |||
pg_copy_logical_replication_slot |
1 | pg_copy_logical_replication_slot ( src_slot_name name, dst_slot_name name [, temporary boolean [, plugin name]] ) → record ( slot_name name, lsn pg_lsn ) |
— | |
| 复制一个名为src_slot_name的现有逻辑复制槽到一个名为dst_slot_name的逻辑复制槽,可选地更改输出插件和持久性。 | 现存 | |||
pg_copy_physical_replication_slot |
1 | pg_copy_physical_replication_slot ( src_slot_name name, dst_slot_name name [, temporary boolean] ) → record ( slot_name name, lsn pg_lsn ) |
— | |
| 将一个名为src_slot_name的现有物理复制槽复制到一个名为dst_slot_name的物理复制槽。 | 现存 | |||
pg_create_logical_replication_slot |
1 | pg_create_logical_replication_slot ( slot_name name, plugin name [, temporary boolean, twophase boolean, failover boolean] ) → record ( slot_name name, lsn pg_lsn ) |
173 次 | |
| 创建一个名为slot_name的新逻辑(解码)复制槽,使用输出插件plugin。 | 现存 | |||
pg_create_physical_replication_slot |
1 | pg_create_physical_replication_slot ( slot_name name [, immediately_reserve boolean, temporary boolean] ) → record ( slot_name name, lsn pg_lsn ) |
102 次 | |
| 创建名为 slot_name 的新物理复制槽。 | 现存 | |||
pg_create_restore_point |
1 | pg_create_restore_point ( name text ) → pg_lsn |
9.41 次 | |
| 在预写式日志中创建一条命名标记记录,供以后用作恢复目标,并返回相应的预写式日志位置。 | 现存 | |||
pg_current_wal_flush_lsn |
1 | pg_current_wal_flush_lsn () → pg_lsn |
— | |
| 返回当前预写式日志刷盘位置(参见下文说明)。 | 现存 | |||
pg_current_wal_insert_lsn |
1 | pg_current_wal_insert_lsn () → pg_lsn |
— | |
| 返回当前预写式日志插入位置(参见下文说明)。 | 现存 | |||
pg_current_wal_lsn |
1 | pg_current_wal_lsn () → pg_lsn |
— | |
| 返回当前预写式日志写入位置(参见下文说明)。 | 现存 | |||
pg_current_xlog_flush_location |
1 | pg_current_xlog_flush_location ( ) → pg_lsn |
— | |
| 获取当前预写式日志刷盘位置 | 于 10 移除 | |||
pg_current_xlog_insert_location基线 |
1 | pg_current_xlog_insert_location ( ) → pg_lsn |
9.41 次 | |
| 获取当前预写式日志插入位置 | 于 10 移除 | |||
pg_current_xlog_location基线 |
1 | pg_current_xlog_location ( ) → pg_lsn |
9.41 次 | |
| 获取当前预写式日志写入位置 | 于 10 移除 | |||
pg_database_collation_actual_version |
1 | pg_database_collation_actual_version ( oid ) → text |
— | |
| 返回数据库当前在操作系统中安装的排序规则的实际版本。 | 现存 | |||
pg_database_size基线 |
2 | pg_database_size ( name ) → bigint |
— | |
| 计算具有指定名称或OID的数据库使用的总磁盘空间。 | 现存 | |||
pg_disable_data_checksums |
1 | pg_disable_data_checksums () → void |
— | |
| 为集簇禁用数据校验和的计算与验证。 | 现存 | |||
pg_drop_replication_slot |
1 | pg_drop_replication_slot ( slot_name name ) → void |
— | |
| 删除名为slot_name的物理或逻辑复制槽。 | 现存 | |||
pg_enable_data_checksums |
1 | pg_enable_data_checksums ( [cost_delay int [, cost_limit int]] ) → void |
— | |
| 启动为集簇启用数据校验和的过程。 | 现存 | |||
pg_export_snapshot |
1 | pg_export_snapshot () → text |
— | |
| 保存事务的当前快照并返回text字符串以标识该快照。 | 现存 | |||
pg_filenode_relation |
1 | pg_filenode_relation ( tablespace oid, filenode oid ) → regclass |
— | |
| 根据关系所在表空间的 OID 和文件节点返回该关系的 OID。 | 现存 | |||
pg_get_wal_replay_pause_state |
1 | pg_get_wal_replay_pause_state () → text |
— | |
| 返回恢复暂停状态。 | 现存 | |||
pg_get_wal_resource_managers |
1 | pg_get_wal_resource_managers () → setof record ( rm_id integer, rm_name text, rm_builtin boolean ) |
— | |
| 返回系统中当前加载的 WAL 资源管理器。 | 现存 | |||
pg_import_system_collations |
1 | pg_import_system_collations ( schema regnamespace ) → integer |
— | |
| 根据操作系统中找到的所有区域设置,向系统目录pg_collation添加排序规则。 | 现存 | |||
pg_indexes_size基线 |
1 | pg_indexes_size ( regclass ) → bigint |
— | |
| 计算附加到指定表的索引所使用的总磁盘空间。 | 现存 | |||
pg_is_in_backup |
1 | pg_is_in_backup () → boolean |
— | |
| 如果正在进行在线排他备份,则返回 true。 | 于 15 移除 | |||
pg_is_in_recovery基线 |
1 | pg_is_in_recovery () → boolean |
— | |
| 如果恢复仍在进行则返回真。 | 现存 | |||
pg_is_wal_replay_paused |
1 | pg_is_wal_replay_paused () → boolean |
— | |
| 如果已请求暂停恢复,则返回真。 | 现存 | |||
pg_is_xlog_replay_paused |
1 | pg_is_xlog_replay_paused ( ) → bool |
— | |
| 如果恢复已暂停,则为真。 | 于 10 移除 | |||
pg_last_wal_receive_lsn |
1 | pg_last_wal_receive_lsn () → pg_lsn |
— | |
| 返回流复制最近接收并同步到磁盘的预写式日志位置。 | 现存 | |||
pg_last_wal_replay_lsn |
1 | pg_last_wal_replay_lsn () → pg_lsn |
— | |
| 返回恢复期间最近重放的预写式日志位置。 | 现存 | |||
pg_last_xact_replay_timestamp |
1 | pg_last_xact_replay_timestamp () → timestamp with time zone |
— | |
| 返回恢复期间最近重放事务的时间戳,即该事务的提交或中止 WAL 记录在主库上生成的时间。 | 现存 | |||
pg_last_xlog_receive_location基线 |
1 | pg_last_xlog_receive_location ( ) → pg_lsn |
9.41 次 | |
| 获取流复制最近接收并同步到磁盘的预写式日志位置。 | 于 10 移除 | |||
pg_last_xlog_replay_location基线 |
1 | pg_last_xlog_replay_location ( ) → pg_lsn |
9.41 次 | |
| 获取恢复期间最近重放的预写式日志位置。 | 于 10 移除 | |||
pg_log_backend_memory_contexts |
1 | pg_log_backend_memory_contexts ( pid integer ) → boolean |
— | |
| 请求记录具有指定进程 ID 的后端进程的内存上下文。 | 现存 | |||
pg_log_standby_snapshot |
1 | pg_log_standby_snapshot () → pg_lsn |
— | |
| 为进行中的事务拍摄快照并将其写入 WAL,无须等待后台写入器或检查点进程记录快照。 | 现存 | |||
pg_logical_emit_message |
2 | pg_logical_emit_message ( transactional boolean, prefix text, content text [, flush boolean DEFAULT false] ) → pg_lsn |
171 次 | |
| 发出逻辑解码消息。 | 现存 | |||
pg_logical_slot_get_binary_changes |
1 | pg_logical_slot_get_binary_changes ( slot_name name, upto_lsn pg_lsn, upto_nchanges integer, VARIADIC options text[] ) → setof record ( lsn pg_lsn, xid xid, data bytea ) |
101 次 | |
| 行为就像pg_logical_slot_get_changes()函数,不过改变会以bytea返回。 | 现存 | |||
pg_logical_slot_get_changes |
1 | pg_logical_slot_get_changes ( slot_name name, upto_lsn pg_lsn, upto_nchanges integer, VARIADIC options text[] ) → setof record ( lsn pg_lsn, xid xid, data text ) |
101 次 | |
| 返回槽 slot_name 中自上次消费更改的位置起的更改。 | 现存 | |||
pg_logical_slot_peek_binary_changes |
1 | pg_logical_slot_peek_binary_changes ( slot_name name, upto_lsn pg_lsn, upto_nchanges integer, VARIADIC options text[] ) → setof record ( lsn pg_lsn, xid xid, data bytea ) |
101 次 | |
| 行为就像pg_logical_slot_peek_changes()函数,不过改变会以bytea返回。 | 现存 | |||
pg_logical_slot_peek_changes |
1 | pg_logical_slot_peek_changes ( slot_name name, upto_lsn pg_lsn, upto_nchanges integer, VARIADIC options text[] ) → setof record ( lsn pg_lsn, xid xid, data text ) |
101 次 | |
| 行为就像pg_logical_slot_get_changes()函数,不过改变不会被消费,即在未来的调用中还会返回这些改变。 | 现存 | |||
pg_ls_archive_statusdir |
1 | pg_ls_archive_statusdir () → setof record ( name text, size bigint, modification timestamp with time zone ) |
— | |
| 返回服务器 WAL 归档状态目录(pg_wal/archive_status)中每个普通文件的名称、大小和最后修改时间(mtime)。 | 现存 | |||
pg_ls_dir基线 |
1 | pg_ls_dir ( dirname text [, missing_ok boolean, include_dot_dirs boolean] ) → setof text |
9.51 次 | |
| 返回指定目录中所有文件的名称(包括目录及其他特殊文件)。 | 现存 | |||
pg_ls_logdir |
1 | pg_ls_logdir () → setof record ( name text, size bigint, modification timestamp with time zone ) |
— | |
| 返回服务器日志目录中每个普通文件的名称、大小和最后修改时间(mtime)。 | 现存 | |||
pg_ls_logicalmapdir |
1 | pg_ls_logicalmapdir () → setof record ( name text, size bigint, modification timestamp with time zone ) |
— | |
| 返回服务器的pg_logical/mappings目录中每个普通文件的名称、大小和最后修改时间(mtime)。 | 现存 | |||
pg_ls_logicalsnapdir |
1 | pg_ls_logicalsnapdir () → setof record ( name text, size bigint, modification timestamp with time zone ) |
— | |
| 返回服务器的pg_logical/snapshots目录中每个普通文件的名称、大小和最后修改时间(mtime)。 | 现存 | |||
pg_ls_replslotdir |
1 | pg_ls_replslotdir ( slot_name text ) → setof record ( name text, size bigint, modification timestamp with time zone ) |
— | |
| 返回服务器的pg_replslot/slot_name目录中每个普通文件的名称、大小和最后修改时间(mtime),其中slot_name是作为函数输入提供的复制槽的名称。 | 现存 | |||
pg_ls_summariesdir |
1 | pg_ls_summariesdir () → setof record ( name text, size bigint, modification timestamp with time zone ) |
— | |
| 返回服务器 WAL 摘要目录(pg_wal/summaries)中每个普通文件的名称、大小和最后修改时间(mtime)。 | 现存 | |||
pg_ls_tmpdir |
1 | pg_ls_tmpdir ( [tablespace oid] ) → setof record ( name text, size bigint, modification timestamp with time zone ) |
— | |
| 返回针对指定tablespace的临时文件目录中每个普通文件的名称、大小和最后修改时间(mtime)。 | 现存 | |||
pg_ls_waldir |
1 | pg_ls_waldir () → setof record ( name text, size bigint, modification timestamp with time zone ) |
— | |
| 返回服务器的预写式日志(WAL)目录中每个普通文件的名称、大小和最后修改时间(mtime)。 | 现存 | |||
pg_partition_ancestors |
1 | pg_partition_ancestors ( regclass ) → setof regclass |
— | |
| 列出给定分区的祖先关系,包括关系本身。 | 现存 | |||
pg_partition_root |
1 | pg_partition_root ( regclass ) → regclass |
— | |
| 返回给定关系所属的分区树的最顶级父节点。 | 现存 | |||
pg_partition_tree |
1 | pg_partition_tree ( regclass ) → setof record ( relid regclass, parentrelid regclass, isleaf boolean, level integer ) |
— | |
| 列出给定分区表或分区索引的分区树中的表或索引,每行对应一个分区。 | 现存 | |||
pg_promote |
1 | pg_promote ( wait boolean DEFAULT true, wait_seconds integer DEFAULT 60 ) → boolean |
— | |
| 将备库提升为主库状态。 | 现存 | |||
pg_read_binary_file |
1 | pg_read_binary_file ( filename text [, offset bigint, length bigint] [, missing_ok boolean] ) → bytea |
162 次 | |
| 返回文件的全部或部分。 | 现存 | |||
pg_read_file基线 |
1 | pg_read_file ( filename text [, offset bigint, length bigint] [, missing_ok boolean] ) → text |
163 次 | |
| 返回一个文本文件的全部或部分,从给定的字节offset开始,最多返回length字节(如果先到达文件末尾,则返回更少)。 | 现存 | |||
pg_relation_filenode基线 |
1 | pg_relation_filenode ( relation regclass ) → oid |
— | |
| 返回当前分配给指定关系的“文件节点”编号。 | 现存 | |||
pg_relation_filepath基线 |
1 | pg_relation_filepath ( relation regclass ) → text |
— | |
| 返回关系的完整文件路径名称(相对于数据库集簇的数据目录,即PGDATA)。 | 现存 | |||
pg_relation_size基线 |
1 | pg_relation_size ( relation regclass [, fork text] ) → bigint |
— | |
| 计算指定关系的一个“分支”所使用的磁盘空间。 | 现存 | |||
pg_reload_conf基线 |
1 | pg_reload_conf () → boolean |
— | |
| 使PostgreSQL服务器的所有进程重新加载其配置文件。 | 现存 | |||
pg_replication_origin_advance |
1 | pg_replication_origin_advance ( node_name text, lsn pg_lsn ) → void |
101 次 | |
| 将给定节点的复制进度设置为给定的位置。 | 现存 | |||
pg_replication_origin_create |
1 | pg_replication_origin_create ( node_name text ) → oid |
— | |
| 用给定的外部名称创建一个复制源,并且返回分配给它的内部 ID。 | 现存 | |||
pg_replication_origin_drop |
1 | pg_replication_origin_drop ( node_name text ) → void |
— | |
| 删除一个以前创建的复制源,包括任何相关的重放进度。 | 现存 | |||
pg_replication_origin_oid |
1 | pg_replication_origin_oid ( node_name text ) → oid |
— | |
| 通过名称查找复制源并返回其内部ID。 | 现存 | |||
pg_replication_origin_progress |
1 | pg_replication_origin_progress ( node_name text, flush boolean ) → pg_lsn |
— | |
| 返回给定复制源的重放位置。 | 现存 | |||
pg_replication_origin_session_is_setup |
1 | pg_replication_origin_session_is_setup () → boolean |
— | |
| 如果在当前会话中选择了复制源则返回真。 | 现存 | |||
pg_replication_origin_session_progress |
1 | pg_replication_origin_session_progress ( flush boolean ) → pg_lsn |
— | |
| 返回当前会话中选择的复制源的重放位置。 | 现存 | |||
pg_replication_origin_session_reset |
1 | pg_replication_origin_session_reset () → void |
— | |
| 取消pg_replication_origin_session_setup()的效果。 | 现存 | |||
pg_replication_origin_session_setup |
1 | pg_replication_origin_session_setup ( node_name text [, pid integer DEFAULT 0] ) → void |
191 次 | |
| 将当前会话标记为从给定的复制源重放,从而允许跟踪重放进度。 | 现存 | |||
pg_replication_origin_xact_reset |
1 | pg_replication_origin_xact_reset () → void |
9.61 次 | |
| 取消pg_replication_origin_xact_setup()的效果。 | 现存 | |||
pg_replication_origin_xact_setup |
1 | pg_replication_origin_xact_setup ( origin_lsn pg_lsn, origin_timestamp timestamp with time zone ) → void |
— | |
| 将当前事务标记为重放在给定LSN和时间戳上提交的事务。 | 现存 | |||
pg_replication_slot_advance |
1 | pg_replication_slot_advance ( slot_name name, upto_lsn pg_lsn ) → record ( slot_name name, end_lsn pg_lsn ) |
— | |
| 推进名为 slot_name 的复制槽当前已确认的位置。 | 现存 | |||
pg_restore_attribute_stats |
1 | pg_restore_attribute_stats ( VARIADIC kwargs "any" ) → boolean |
— | |
| 创建或更新列级统计信息。 | 现存 | |||
pg_restore_extended_stats |
1 | pg_restore_extended_stats ( VARIADIC kwargs "any" ) → boolean |
— | |
| 创建或更新统计对象的统计信息。 | 现存 | |||
pg_restore_relation_stats |
1 | pg_restore_relation_stats ( VARIADIC kwargs "any" ) → boolean |
— | |
| 更新表级统计信息。 | 现存 | |||
pg_rotate_logfile基线 |
1 | pg_rotate_logfile () → boolean |
— | |
| 通知日志文件管理器立即切换到一个新的输出文件。 | 现存 | |||
pg_size_bytes |
1 | pg_size_bytes ( text ) → bigint |
— | |
| 将人类可读格式的大小(由pg_size_pretty返回)转换为字节。 | 现存 | |||
pg_size_pretty基线 |
2 | pg_size_pretty ( bigint ) → text |
9.21 次 | |
| 将字节大小转换为更易于人类阅读的格式,带有大小单位(字节,kB,MB,GB,TB或PB)。 | 现存 | |||
pg_split_walfile_name |
1 | pg_split_walfile_name ( file_name text ) → record ( segment_number numeric, timeline_id bigint ) |
— | |
| 从 WAL 文件名中提取序列号和时间线 ID。 | 现存 | |||
pg_start_backup基线 |
1 | pg_start_backup ( label text [, fast boolean [, exclusive boolean ]] ) → pg_lsn |
9.62 次 | |
| 准备服务器开始在线备份。 | 于 15 移除 | |||
pg_stat_file基线 |
1 | pg_stat_file ( filename text [, missing_ok boolean] ) → record ( size bigint, access timestamp with time zone, modification timestamp with time zone, change timestamp with time zone, creation timestamp with time zone, isdir boolean ) |
9.51 次 | |
| 返回一个记录,包含文件大小、最后访问时间戳、最后修改时间戳、最后文件状态变更时间戳(仅限 Unix 平台)、文件创建时间戳(仅限 Windows)以及一个指示其是否为目录的标志。 | 现存 | |||
pg_stop_backup基线 |
2 | pg_stop_backup ( exclusive boolean [, wait_for_archive boolean ] ) → setof record ( lsn pg_lsn, labelfile text, spcmapfile text ) |
103 次 | |
| 结束排他或非排他的在线备份。 | 于 15 移除 | |||
pg_switch_wal |
1 | pg_switch_wal () → pg_lsn |
— | |
| 强制服务器切换到新的预写式日志文件,使当前文件可以归档(假设正在使用连续归档)。 | 现存 | |||
pg_switch_xlog基线 |
1 | pg_switch_xlog ( ) → pg_lsn |
9.41 次 | |
| 强制切换到新的预写式日志文件(默认仅限超级用户,但可以向其他用户授予EXECUTE权限以运行此函数) | 于 10 移除 | |||
pg_sync_replication_slots |
1 | pg_sync_replication_slots () → void |
— | |
| 将逻辑故障切换复制槽从主库同步到备库。 | 现存 | |||
pg_table_size基线 |
1 | pg_table_size ( regclass ) → bigint |
— | |
| 计算指定表所使用的磁盘空间,不包括索引(但包括其 TOAST 表(如有)、空闲空间映射和可见性映射)。 | 现存 | |||
pg_tablespace_size基线 |
2 | pg_tablespace_size ( name ) → bigint |
— | |
| 计算具有指定名称或OID的表空间中使用的总磁盘空间。 | 现存 | |||
pg_terminate_backend基线 |
1 | pg_terminate_backend ( pid integer, timeout bigint DEFAULT 0 ) → boolean |
141 次 | |
| 终止具有指定进程ID的后端进程的会话。 | 现存 | |||
pg_total_relation_size基线 |
1 | pg_total_relation_size ( regclass ) → bigint |
— | |
| 计算指定表所使用的总磁盘空间,包括所有索引和TOAST数据。 | 现存 | |||
pg_try_advisory_lock基线 |
2 | pg_try_advisory_lock ( key bigint ) → boolean |
— | |
| 尝试获取一个排他的会话级咨询锁。 | 现存 | |||
pg_try_advisory_lock_shared基线 |
2 | pg_try_advisory_lock_shared ( key bigint ) → boolean |
— | |
| 尝试获取一个共享的会话级咨询锁。 | 现存 | |||
pg_try_advisory_xact_lock |
2 | pg_try_advisory_xact_lock ( key bigint ) → boolean |
— | |
| 尝试获取一个排他的事务级咨询锁。 | 现存 | |||
pg_try_advisory_xact_lock_shared |
2 | pg_try_advisory_xact_lock_shared ( key bigint ) → boolean |
— | |
| 尝试获取一个共享的事务级咨询锁。 | 现存 | |||
pg_wal_lsn_diff |
1 | pg_wal_lsn_diff ( lsn1 pg_lsn, lsn2 pg_lsn ) → numeric |
— | |
| 计算两个预写式日志位置之间的字节差(lsn1 - lsn2)。 | 现存 | |||
pg_wal_replay_pause |
1 | pg_wal_replay_pause () → void |
— | |
| 请求暂停恢复。 | 现存 | |||
pg_wal_replay_resume |
1 | pg_wal_replay_resume () → void |
— | |
| 如果暂停了,则重新启动恢复。 | 现存 | |||
pg_walfile_name |
1 | pg_walfile_name ( lsn pg_lsn ) → text |
— | |
| 将预写式日志位置转换为包含该位置的 WAL 文件的名称。 | 现存 | |||
pg_walfile_name_offset |
1 | pg_walfile_name_offset ( lsn pg_lsn ) → record ( file_name text, file_offset integer ) |
— | |
| 将预写式日志位置转换为WAL文件名和该文件中的字节偏移量。 | 现存 | |||
pg_xlog_location_diff |
1 | pg_xlog_location_diff ( location pg_lsn, location pg_lsn ) → numeric |
9.41 次 | |
| 计算两个事务日志位置之差 | 于 10 移除 | |||
pg_xlog_replay_pause |
1 | pg_xlog_replay_pause ( ) → void |
— | |
| 立即暂停恢复(默认仅限超级用户,但可以向其他用户授予EXECUTE权限以运行此函数)。 | 于 10 移除 | |||
pg_xlog_replay_resume |
1 | pg_xlog_replay_resume ( ) → void |
— | |
| 如果恢复已暂停,则重新开始恢复(默认仅限超级用户,但可以向其他用户授予EXECUTE权限以运行此函数)。 | 于 10 移除 | |||
pg_xlogfile_name基线 |
1 | pg_xlogfile_name ( location pg_lsn ) → text |
9.41 次 | |
| 将事务日志位置字符串转换为文件名 | 于 10 移除 | |||
pg_xlogfile_name_offset基线 |
1 | pg_xlogfile_name_offset ( location pg_lsn ) → text, integer |
9.41 次 | |
| 将事务日志位置字符串转换为文件名和文件内的十进制字节偏移量 | 于 10 移除 | |||
set_config基线 |
1 | set_config ( setting_name text, new_value text, is_local boolean ) → text |
— | |
| 将参数setting_name设置为new_value,并返回该值。 | 现存 | |||