PostgreSQL 文档检索
PG 18 · 按类别浏览,或输入名称与关键词
常用条目12316
pg_relation_filepath返回关系的完整文件路径名称(相对于数据库集簇的数据目录,即PGDATA)。
Returns the entire file path name (relative to the database cluster's data directory, PGDATA) of the relation.
pg_relation_filepath ( relation regclass …函数 · 系统管理函数
pg_relation_size计算指定关系的一个“分支”所使用的磁盘空间。
Computes the disk space used by one “fork” of the specified relation.
pg_relation_size ( relation regclass [, fork text] ) → bigint
系统管理函数函数 · 系统管理函数
pg_relation_sql根据 PostgreSQL 外键生成可内联的关系导航 SQL 函数
Generate inlinable SQL functions for navigating PostgreSQL foreign-key relations
foreign-key relations sql-functions code-generation planner inlining ddl
pg…实用工具 · 扩展目录
pg_relayPostgreSQL持久事件处理器
Durable event processor for PostgreSQL
extension go golang listen-notify postgres postgresql postgresql extension relay
pg_relay
功能特性功能特性 · 扩展目录
pg_reload_conf使PostgreSQL服务器的所有进程重新加载其配置文件。
Causes all processes of the PostgreSQL server to reload their configuration files.
pg_reload_conf () → boolean
系统管理函数函数 · 系统管理函数
pg_relusage打印查询引用的表与列
Log all the queries that reference a particular column
pg_relusage
监控统计监控统计 · 扩展目录
pg_remote_exec从 SQL 执行 shell 命令,并可选择返回标准输出。
Executes shell commands from SQL and optionally returns their standard output.
administration shell-execution
pg_remote_exec
管理运维管理运维 · 扩展目录
pg_render使用SQL渲染HTML页面
Render HTML in SQL
pgrx
pg_render
实用工具实用工具 · 扩展目录
pg_repack在线垃圾清理与表膨胀治理
Reorganize tables in PostgreSQL databases with minimal locks
pg_repack
管理运维管理运维 · 扩展目录
pg_repeater通过 postgres_fdw 将实用语句和序列化查询计划复制到远程 PostgreSQL 节点。
Replicates utility statements and serialized query plans to a remote PostgreSQL node over postgres_fdw.
distributed-query query-plan
pg_repe…复制与数据流 · 扩展目录
pg_replayfeed通过逻辑复制槽输出仅含键的 WAL 变更流
WAL-native key-only change streams with logical replication slots
cdc logical-decoding
pg_replayfeed
复制与数据流复制与数据流 · 扩展目录
pg_replica基于共识的自动故障切换
Consensus-driven automatic failover for PostgreSQL
consensus database database-management failover high availability pgrx postgres-extension postgresql raft replication rust stre…管理运维 · 扩展目录
pg_replication_origin已注册的复制源
registered replication origins
pg_replication_origin目录包含所有已创建的复制源。更多复制源的信息请见第 48 章。 和大部分系统目录不同,pg_replication_origin在一个集簇的所有数据库之间共享:每个集簇只有一份pg_replication_origin拷贝,而不是每个数据库一份。
roiden…系统目录表 · 系统目录
pg_replication_origin52.44. pg_replication_origin
pg_replication_origin 目录包含所有已创建的复制源。更多复制源的信息请见第 48 章。和大部分系统目录不同,pg_replication_origin 在一个集簇的所有数据库之间共享:每个集簇只有一份 pg_replication_origin 拷贝,而不是每个数据库一份。表 52.44. pg_re…pg_replication_origin
pg_replication_origin_advance将给定节点的复制进度设置为给定的位置。
Sets replication progress for the given node to the given location.
pg_replication_origin_advance ( node_name text, lsn pg_lsn ) → void
系统管理函数函数 · 系统管理函数
pg_replication_origin_create用给定的外部名称创建一个复制源,并且返回分配给它的内部 ID。
Creates a replication origin with the given external name, and returns the internal ID assigned to it.
pg_replication_origin_create ( node_name text ) → oid
系…函数 · 系统管理函数
pg_replication_origin_drop删除一个以前创建的复制源,包括任何相关的重放进度。
Deletes a previously-created replication origin, including any associated replay progress.
pg_replication_origin_drop ( node_name text ) → void
系统管理函数函数 · 系统管理函数
pg_replication_origin_oid通过名称查找复制源并返回其内部ID。
Looks up a replication origin by name and returns the internal ID.
pg_replication_origin_oid ( node_name text ) → oid
系统管理函数函数 · 系统管理函数
pg_replication_origin_progress返回给定复制源的重放位置。
Returns the replay location for the given replication origin.
pg_replication_origin_progress ( node_name text, flush boolean ) → pg_lsn
系统管理函数函数 · 系统管理函数
pg_replication_origin_session_is_setup如果在当前会话中选择了复制源则返回真。
Returns true if a replication origin has been selected in the current session.
pg_replication_origin_session_is_setup () → boolean
系统管理函数函数 · 系统管理函数
pg_replication_origin_session_progress返回当前会话中选择的复制源的重放位置。
Returns the replay location for the replication origin selected in the current session.
pg_replication_origin_session_progress ( flush boolean ) → pg_lsn
系统管理函数函数 · 系统管理函数
pg_replication_origin_session_reset取消pg_replication_origin_session_setup()的效果。
Cancels the effects of pg_replication_origin_session_setup().
pg_replication_origin_session_reset () → void
系统管理函数函数 · 系统管理函数
pg_replication_origin_session_setup将当前会话标记为从给定的复制源重放,从而允许跟踪重放进度。
Marks the current session as replaying from the given origin, allowing replay progress to be tracked.
pg_replication_origin_session_setup ( node_name text [, pi…函数 · 系统管理函数
pg_replication_origin_status有关复制源的信息,包括复制进度
The pg_replication_origin_status view contains information about how far replay for a certain origin has progressed. For more on replication origins see Chapter 48.
pg_replic…系统视图 · 系统目录
pg_replication_origin_status53.19. pg_replication_origin_status
pg_replication_origin_status 视图包含关于某个源的重放进度信息。有关复制源的更多信息,请参见第 48 章。表 53.19. pg_replication_origin_status 列 列类型 描述 local_id oid(引用 pg_replication_origin.ro…pg_replication_origin_status
pg_replication_origin_xact_reset取消pg_replication_origin_xact_setup()的效果。
Cancels the effects of pg_replication_origin_xact_setup().
pg_replication_origin_xact_reset () → void
系统管理函数函数 · 系统管理函数
pg_replication_origin_xact_setup将当前事务标记为重放在给定LSN和时间戳上提交的事务。
Marks the current transaction as replaying a transaction that has committed at the given LSN and timestamp.
pg_replication_origin_xact_setup ( origin_lsn pg_lsn, …函数 · 系统管理函数
pg_replication_slot_advance推进名为 slot_name 的复制槽当前已确认的位置。
Advances the current confirmed position of a replication slot named slot_name.
pg_replication_slot_advance ( slot_name name, upto_lsn pg_lsn ) → record ( slot_na…函数 · 系统管理函数
pg_replication_slots复制槽信息
The pg_replication_slots view provides a listing of all replication slots that currently exist on the database cluster, along with their current state.
pg_replication_slots视图提供当前数据库集簇中…系统视图 · 系统目录
pg_replication_slots53.20. pg_replication_slots
pg_replication_slots 视图提供当前数据库集簇中所有复制槽及其当前状态的列表。有关复制槽的更多信息,请参见第 26.2.6 节和第 47 章。表 53.20. pg_replication_slots 列 列类型 描述 slot_name name 一个集簇范围内唯一的复制槽标识符 plugin name…pg_replication_slots
pg_replslot包含复制槽数据的子目录
PGDATA 路径
$PGDATA/pg_replslot
相对路径 pg_replslot存储结构 · PGDATA 路径
pg_resetwalpg_resetwal — 重置 PostgreSQL 数据库集簇的预写式日志及其他控制信息
服务端程序
pg_resetwal [ -f ] [ -n ] [ option ...] {[ -D ] datadir }
手册中的可执行程序 pg_resetwal
程序版本 10.23
参考清单 服务端程序
选项定义组 12
手册中的选项
如上所述,即使 pg_resetwa…命令行工具 · 服务端程序
pg_resetwalpg_resetwal pg_resetwal — 重置 PostgreSQL 数据库集簇的预写式日志及其他控制信息大纲 pg_resetwal [ -f | --force ] [ -n | --dry-run ] [option...] [ -D | --pgdata ]datadirpg_resetwal
pg_resetwal --char-signedness=option--char-signedness=option
手工设置默认的 char 有符号性。可选值为 signed 和 unsigned。 对于由 pg_upgrade 从 18 之前的 PostgreSQL 版本升级而来的数据库集簇,安全值应为升级前运行该集簇的平台上默认的 char 有符号性。对于所有其他集簇,signed 就是安全值。不过,该选项专供 pg_upgrade 使用…pg_resetwal › 选项
pg_resetwal --commit-timestamp-ids=xid,xid-c xid,xid--commit-timestamp-ids=xid,xid
手工设置可检索提交时间的最旧和最新事务 ID。 可检索提交时间的最旧事务 ID 的安全值(第一部分),可以通过查看数据目录下 pg_commit_ts 目录中数值最小的文件名来确定。相反,可检索提交时间的最新事务 ID 的安全值(第二部分),可以通过查看同一目录中数值最大的文件名来确定。文件名均为…pg_resetwal › 选项
pg_resetwal --dry-run-n--dry-run
-n/--dry-run 选项会让 pg_resetwal 打印从 pg_control 重建出的值以及即将更改的值,然后在不做任何修改的情况下退出。这主要是调试工具,但在真正允许 pg_resetwal 执行之前,也可用作合理性检查。pg_resetwal › 选项
pg_resetwal --epoch=xid_epoch-e xid_epoch--epoch=xid_epoch
手工设置下一个事务 ID 的纪元。 事务 ID 纪元实际上并未存储在数据库中的任何地方,除了由 pg_resetwal 设置的这个字段,因此就数据库本身而言,任何值都可用。可能需要调整该值,以确保 Slony-I 和 Skytools 等复制系统正常工作 — 如果确有需要,应该可以从下游复制数据库的状态中获得合适的值。pg_resetwal › 选项
pg_resetwal --force-f--force
即使在可能有危险的情况下,也强制 pg_resetwal 继续执行,如上文所述。具体来说,如果服务器未被干净关闭,或者 pg_resetwal 无法为 pg_control 确定有效数据,则必须指定该选项。pg_resetwal › 选项
pg_resetwal --help-?--help
显示帮助,然后退出。pg_resetwal › 选项
pg_resetwal --multixact-ids=mxid,mxid-m mxid,mxid--multixact-ids=mxid,mxid
手工设置下一个和最旧的多事务 ID。 下一个多事务 ID 的安全值(第一部分)可以通过查看数据目录下 pg_multixact/offsets 目录中数值最大的文件名,先加一,再乘以 65536 (0x10000) 来确定。相反,最旧的多事务 ID 的安全值(-m 的第二部分)可以通过查看同一目录中数值…pg_resetwal › 选项
更多结果
输入名称或关键词,从 PostgreSQL 手册与扩展目录中直接找到定义。
pg17: 限定版本 ex: 只搜扩展 ↑↓ 选择 ↵ 打开