| 语言 | 格式 | 评分 |
|---|---|---|
英语 | .pdf | 3 |
| 摘要 | ||
The document provides detailed release notes for PostgreSQL 17beta1, highlighting several key changes and improvements. Notable updates include changes to the optimizer to enhance CTE plans by considering column statistics and sort order, modifications to WAL file name functions to report LSN segments, and the removal of deprecated features like db_user_namespace. Additionally, there are updates to libpq functions, including new capabilities for password management, portal and prepared statement handling, and TLS connections. The document also notes changes to psql behavior, such as improved privilege display and support for control-C to cancel connections. Migration guidelines are provided, emphasizing the need for dump/restore or logical replication for data transition. The release notes stress that PostgreSQL 17 contains significant changes that may affect compatibility with previous versions, requiring careful consideration during migration. | ||
| AI总结 | ||
### PostgreSQL 17beta1 主要更新总结
#### 1. **服务器变量和行为调整**
- **`session_auth_is_superuser` 重命名为 `current_role_is_superuser`**:更准确地反映当前角色的超级用户状态。
- **`SET SESSION AUTHORIZATION` 处理方式调整**:现在基于 `SET` 命令执行时的当前会话用户超级用户状态,而非连接时的状态。
- **移除 `db_user_namespace` 特性**:该特性模拟每个数据库的用户,使用率较低。
- **移除 `wal_sync_method` 的 `fsync_writethrough` 值**:在 Windows 上,其功能与 `fsync` 相同。
- **调整 `pg_walfile_name()` 和 `pg_walfile_name_offset()` 函数的行为**:现在返回 LSN 段编号,而非前一个段编号。
- **移除 `trace_recovery_messages` 服务器变量**:不再需要。
- **移除信息模式列 `element_types.domain` 的默认值**:不再使用。
#### 2. **优化器改进**
- 允许优化器通过早期行输出中的列统计信息优化 CTE(Common Table Expressions)计划。
- 改进 `psql` 的默认和空权限显示,空权限显示为 `(none)`。
#### 3. **WAL 和恢复改进**
- 调整 `pg_stat_progress_vacuum` 列:`max_dead_tuples` 改为 `max_dead_tuple_bytes`,`num_dead_tuples` 改为 `dead_tuple_bytes`,现在报告字节数而非元组数。
#### 4. **安全性改进**
- **限制 `ago` 在间隔值中的使用**:只能在末尾出现,且不能为空或重复。
- **移除 `old_snapshot_threshold` 变量**:防止 `vacuum` 删除可能仍被活动事务可见的行。
#### 5. **统计信息和监控**
- **`pg_stat_statements` 柱读写时间统计列重命名**:`blk_read_time` 改为 `shared_blk_read_time`,`blk_write_time` 改为 `shared_blk_write_time`。
- **移除 `pg_stat_checkpointer` 中的 `buffers_backend` 和 `buffers_backend_fsync`**:这些字段被视为冗余。
- **`pg_attribute` 统计信息调整**:`attstattarget` 和 `stxstattarget` 现在表示默认统计目标为 `NULL`。
#### 6. **API 和工具改进**
- **`libpq` 新增功能**:
- 新增 `PQchangePassword()` 函数,支持修改角色密码并加密传输。
- 新增 `PQclosePrepared()`、`PQclosePortal()` 等函数,支持关闭预处理语句和portal。
- 新增 `PQsetChunkedRowsMode()`,允许按块获取结果。
- 新增 `PQsendPipelineSync()` 和 `PQsocketPoll()` 函数,支持管道同步和网络套接字轮询。
- **`psql` 新增功能**:
- 支持通过 `Ctrl-C` 取消连接。
- 支持 `FETCH_COUNT` 配置非 `SELECT` 查询的行为。
- 改进 `\dp` 命令的空权限显示,空权限显示为 `(none)`。
- 提升 `psql` 的自动补全功能。
#### 7. **其他改进**
- **新增 `pg_walsummary` 工具**:用于导出 WAL 摘要文件。
- **`pg_dump` 支持大对象分批恢复**:避免事务限制,支持并行恢复。
- **优化 `plpgsql` 行为**:允许 `%TYPE` 和 `%ROWTYPE` 表示非数组类型的数组。
#### 8. **移除特性**
- 移除不再需要的服务器变量和功能,优化代码结构。
#### 9. **迁移注意事项**
- 升级需使用 `pg_dumpall`、`pg_upgrade` 或逻辑复制。
- 确保函数在维护操作中使用安全的 `search_path`。
#### 10. **其他**
- PostgreSQL 17 符合 SQL:2023 标准的大部分核心功能,支持超过 170 个核心特性。
- 新增对 `sslnegotiation=direct` 的支持,允许 TLS 连接无需网络协商。
以上为 PostgreSQL 17beta1 的主要更新内容,涵盖功能改进、移除的特性以及用户需要注意的事项。 | ||
P1
P2
P3
P4
P5
P6
P7
P8
P9
P10
P11
P12
下载文档到本地,方便使用
- 可预览页数已用完,剩余
3005 页请下载阅读 -
文档评分














PostgreSQL 17beta1 A4 Documentation
Go 101 (Golang 101) v1.21.0
Go 101 (Golang 101) v1.21.0