暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

PostgreSQL 15 16 小版本更新信息小结 版本更新是不是挤牙膏

AustinDatabases 2024-07-01
71

开头还是介绍一下群,如果感兴趣 PolarDB ,MongoDB ,MySQL ,PostgreSQL ,Redis, Oceanbase, Sql Server 等有问题,有需求都可以加群群内有各大数据库行业大咖,可以解决你的问题。加群请联系 liuaustin3 ,(共 2390 人左右 1 + 2 + 3 + 4 +5 +6)新人分配到 6 群。

最近整理了 MySQL 的 8.0.0 到 8.0.37 的版本中主要的更新内容要点和官方的链接的位置,PG 在版本上功能上,更新的速度相对 MySQL 有过之而无不及,本期我们也过一过 PG 从 PG 12 到 PG 16 中小版本的更新的功能和 Bug Fixed。这里我们从 PG12 开始的每个小版本一直到 PG16 的每个小版本中的更新的 release note 的记录中挑拣重要的进行列表。PG15--PG16 中各个小版本的内容更新较多,可能由于时间的原因和个人的能力原因,忽略掉您认为重要的更新,您可以告诉我将其进行完善。


15.0

版本号更新要点/bug fixed链接/注释
15.0支持 SQL Merge 功能https://www.postgresql.org/docs/release/15.0/
15.0更细粒度的对逻辑复制进行设置包含设置指定列的功能https://www.postgresql.org/docs/release/15.0/
15.0针对 ZSTD 压缩的支持,比如在 pg_basebackup 中使用数据压缩的新的方式https://www.postgresql.org/docs/release/15.0/
15.0Json 结构化输出日志的功能https://www.postgresql.org/docs/release/15.0/
15.0对于内存和磁盘排序的功能https://www.postgresql.org/docs/release/15.0/
15.0移除了 public schema 创建 object 的权限Change the owner of the public schema to be the new pg_database_owner role (Noah Misch)
15.0提高内存中排序的性能并减少内存消耗https://www.postgresql.org/docs/release/15.0/
15.0提高在 work_mem 内存不足后的排序性能https://www.postgresql.org/docs/release/15.0/
15.0允许 select distinct 使用并行https://www.postgresql.org/docs/release/15.0/
15.0允许 full page 使用 lz4 和 zstd 的数据压缩方式This is controlled by the wal_compression server setting.
15.0对系统中的窗口函数进行性能提升Improve the performance of window functions that use row_number(), rank(), dense_rank() and count() (David Rowley)
15.0提升 copy 命令的数据写入的性能Improve performance of psql's \copy command, by sending data in larger chunks

15.1

版本号更新要点/bug fixed链接/注释
15.1修复删除临时表空间时的遗漏致使磁盘空间浪费的问题Fix failure to remove non-first segments of large tables (Tom Lane)
15.1在 GIN 索引的快速插入路径中修复 WAL 操作的错误排序https://www.postgresql.org/docs/release/15.1/

15.2

版本号更新要点/bug fixed链接/注释
15.2修复在分区表或继承树的 GENERATED 期间,计算子表中哪些 UPDATE 列需要更新的问题https://www.postgresql.org/docs/release/15.2/
15.2修复 merge 语句中 bug 问题Fix MERGE's check for unreachable WHEN clauses (Dean Rasheed)

15.3

版本号更新要点/bug fixed链接/注释
15.3在使用 create schema 中防止命令对 search_path 中的设置进行更改Prevent CREATE SCHEMA from defeating changes in search_path (Alexander Lakhin)
15.3修复 MERGE 并发更新时的问题Fix MERGE problems with concurrent updates (Dean Rasheed, Álvaro Herrera)
15.3修复执行计划内存泄露的问题Fix memory leak in Memoize plan execution (David Rowley)
15.3https://www.postgresql.org/docs/release/15.3/
contrib/pg_walinspect 中,限制 pg_get_wal_records_info() 的内存使用In contrib/pg_walinspect, limit memory usage of pg_get_wal_records_info() (Bharath Rupireddy)https://www.postgresql.org/docs/release/15.3/

15.4

版本号更新要点/bug fixed链接/注释
15.4针对可执行脚本的安全设置,如果名称包含了引号,反斜杠,美元符号则不可以在扩展脚本中进行所有者名称的替换避免 SQL 注入的安全风险(CVE - 2023 - 39417)
15.4修复 BRIN 索引中空白(无行)范围和全 NULL 范围之间的混淆,以及全 NULL 摘要的不正确合并https://www.postgresql.org/docs/release/15.4/

15.5

版本号更新要点/bug fixed链接/注释
15.5修复在 DISTINCT``"any"聚合函数中对未知类型参数的处理(CVE-2023-5868)
15.5防止 pg_signal_backend 角色向后台工作进程和自动清理进程发送信号安全性巩固
15.5在 BRIN interval_minmax_multi_ops 索引中避免具有极端区间值的计算溢出https://www.postgresql.org/docs/release/15.5/
15.5避免系统日志记录器进程的标准输入意外关闭

15.6 跳过

15.7

版本号版本更新功能网页连接/注释
15.7pg_stats_ext and pg_stats_ext_exprs安全性更新修复安全漏洞
15.7修复当表基于布尔列进行分区且查询具有布尔IS NOT子句时对 NULL 分区的不正确修剪(David Rowley)A NULL value satisfies a clause such as boolcol IS NOT FALSE, so pruning away a partition containing NULLs yielded incorrect answers.
15.7在删除孤立临时表期间避免死锁
15.7修复 XID 状态函数中旧事务 ID 的检测Transaction IDs more than 231 transactions in the past could be misidentified as recent, leading to misbehavior of pg_xact_status() or txid_status().
15.7确保表的可用空间映射不会返回超出表末尾的页面Because the freespace map isn't WAL-logged, this was possible in edge cases involving an OS crash, a replica promote, or a PITR restore. The result would be a “could not read block” error.
15.7修复 BRIN 输出函数中的错误https://www.postgresql.org/docs/release/15.7/


PostgreSQL 是当前最新的PG数据库版本,此版本中有很多更新的功能,下面我们整理一下,同时需要注意一些PG16对于PGSQL的变化,防止升级后对原有的一些语句执行或语句的正确性有影响

PG 16

版本号版本号更新功能网页连接/注释
PG16允许FULL和内部右侧OUTER哈希连接的并行化https://www.postgresql.org/docs/release/16.0/
PG16允许从备用服务器进行逻辑复制
PG16允许逻辑复制订阅使用并行来处理较大的事务中的数据
PG16允许使用新的pg_stat_io视图监测 I/O 统计信息
PG16提高了vacuum freezing的性能
PG16更改针对PL/pgSQL绑定游标变量的赋值规则Previously, the string value of such variables was set to match the variable name during cursor assignment; now it will be assigned during OPEN, and will not match the variable name. To restore the previous behavior, assign the desired portal name to the cursor variable before OPEN.
PG16createrole权限角色安全性问题,原有的权限过大的问题被修整The role's default inheritance behavior can be overridden with the new GRANT ... WITH INHERIT clause. This allows inheritance of some roles and not others because the members' inheritance status is set at GRANT time. Previously the inheritance status of member roles was controlled only by the role's inheritance status, and changes to a role's inheritance status affected all previous and future member roles.
PG16对ORDER BY或DISTINCT的聚合添加使用预排序数据的能力
PG16允许将不可为空的输入作为内部关系来执行反连接,允许FULL和内部右OUTER哈希连接的并行化https://www.postgresql.org/docs/release/16.0/
PG16针对vauum和analyze在缓冲区中的内存的使用进行优化The VACUUM/ANALYZE option is BUFFER_USAGE_LIMIT, and the vacuumdb option is --buffer-usage-limit. The default value is set by server variable vacuum_buffer_usage_limit, which also controls autovacuum.
PG16autovacuum 运行中影响性能后,调节延迟参数生效性的改变Allow autovacuum to more frequently honor changes to delay settings Rather than honor changes only at the start of each relation, honor them at the start of each block.
PG16允许在windows10 上使用 huge pages
PG16允许 logical decoding 在standbys上进行设置Snapshot WAL records are required for logical slot creation but cannot be created on standbys. To avoid delays, the new function pg_log_standby_snapshot() allows creation of such records.
PG16允许并行复制在逻辑复制上使用The CREATE SUBSCRIPTION STREAMING option now supports parallel to enable application of large transactions by parallel workers. The number of parallel workers is controlled by the new server variable max_parallel_apply_workers_per_subscription. Wait events LogicalParallelApplyMain, LogicalParallelApplyStateChange, and LogicalApplySendData were also added. Column leader_pid was added to system view pg_stat_subscription to track parallel activity.
PG16允许逻辑复制应用在无主键的表Improve performance for logical replication apply without a primary key (Onder Kalaci, Amit Kapila)
PG16提高了vacuum和vacummdb的操作的灵活性This is accomplished by having VACUUM turn off PROCESS_MAIN or by vacuumdb using the --no-process-main option.
PG16针对JSON的大量更新处理的函数和修改原有的问题https://www.postgresql.org/docs/release/16.0/
PG16pg_dump功能的更新,可以针对子表和分区表进行指定dumpThe new options are --table-and-children, --exclude-table-and-children, and --exclude-table-data-and-children.
PG16增加了LZ4和zstd压缩的方式在 pg_dump和pg_basebackupImprove pg_dump to accept a more consistent compression syntax Options like --compress=gzip:5.
PG16可以提供vacuumdb 排除schema和指定schema的功能These are controlled by options --schema and --exclude-schema.
PG16针对pg_walinspect,pg_waldump,pg_buffercache等进行功能更新

PG 16.1

版本号版本号更新功能网页连接/注释
PG16.1在各种 SQL 函数中更干净地处理无效索引Report an error if pgstatindex(), pgstatginindex(), pgstathashindex(), or pgstattuple() is applied to an invalid index. If brin_desummarize_range(), brin_summarize_new_values(), brin_summarize_range(), or gin_clean_pending_list() is applied to an invalid index, do nothing except to report a debug-level message. Formerly these functions attempted to process the index, and might fail in strange ways depending on what the failed CREATE INDEX had left behind.
16.1修复分区表中的批量表插入Improper sharing of insertion state across partitions could result in failures during COPY FROM, typically manifesting as “could not read block NNNN in file XXXX: read only 0 of 8192 bytes” errors.
16.1修复了在执行explain中可能导致崩溃的问题Avoid crash in EXPLAIN if a parameter marked to be displayed by EXPLAIN has a NULL boot-time value (Xing Guo, Aleksander Alekseev, Tom Lane)
16.1修复pg_dump pg_restore 部分bugFix pg_restore so that selective restores will include both table-level and column-level ACLs for selected tables,Fix pg_dump to dump the new run_as_owner option of subscriptions

PG 16.2

版本号版本号更新功能网页连接/注释
PG16.2避免产生错误的分区表执行计划
PG16.2修复PlaceHolderVars中子查询输出表达式不正确的包装This fixes incorrect results when a subquery is underneath an outer join and has an output column that laterally references something outside the outer join's scope. The output column might not appear as NULL when it should do so due to the action of the outer join.
16.2修复了merge update工作中的一些问题尤其在分区表中的一些bugWhen executing a MERGE UPDATE action on a partitioned table, if the UPDATE is turned into a DELETE and INSERT due to changing a partition key column, skip firing AFTER UPDATE ROW triggers, as well as other post-update actions such as RLS checks. These actions would typically fail, which is why a regular UPDATE doesn't do them in such cases; MERGE shouldn't either.
PG16.2在并行哈希连接中避免请求过大的共享内存区域
pg16.2修复了在继承树中复杂的情况下,进行alter table add column可能产生的错误问题Fix possible failure during ALTER TABLE ADD COLUMN on a complex inheritance tree (Tender Wang)
16.2在备用服务器中在子事务期间错误处理死元组Prevent standby servers from incorrectly processing dead index tuples during subtransactions (Fei Changhong)

PG 16.3

版本号版本号更新功能网页连接/注释
PG16.3修复了系统安全性漏洞Restrict visibility of pg_stats_ext and pg_stats_ext_exprs entries to the table owner (Nathan Bossart)
PG16.3在删除孤立临时表期间避免死锁If the session that creates a temporary table crashes without removing the table, autovacuum will eventually try to remove the orphaned table. However, an incoming session that's been assigned the same temporary namespace will do that too. If a temporary table has a dependency (such as an owned sequence) then a deadlock could result between these two cleanup attempts.
PG16.3对vacuum的程序进行了加固避免运行中的可能产生的错误VACUUM's computation of per-database frozen-XID values from per-relation values could get confused by a concurrent update of those values by another VACUUM.
PG16.3这个问题也在之前整理PG12的版本中经常发现,难道这个问题在每个版本都有问题Transaction IDs more than 231 transactions in the past could be misidentified as recent, leading to misbehavior of pg_xact_status() or txid_status().
PG16.3避免在PG查询中查询被cancel后内存泄露This happened only when cancelling a non-last query in a query string made with ; separators.

置顶文章

临时工说:数据库和周边做不好原因是产品经理的锅? 读从OtterTune的倒下说起-有感

MYSQL 版本迁移带来 严重生产事故“的”分析

MongoDB 的一张“大字报”  服务客户,欢迎DISS

PostgreSQL  哪些版本尽量避免使用,版本更新重点明晰(PG12)

临时工访谈:腾讯“退休”的架构师怎么看数据库 和 DBA 在项目中的重要性
SQL SERVER 2022 针对缓存扫描和Query Store 的进步,可以考虑进行版本升级

往期热门文章:
MongoDB  聚合怎么写,更复杂的聚合案例
临时工访谈: 临时工 写了6年多公众号赚了多少钱?
PostgreSQL 版本升级到PG14后,pgbouncer 无法使用怎么回事?
临时工访谈:NoSQL 大有前景,MongoDB DBA 被裁员后谋求新职位
临时工访谈:问金融软件开发总监  哪些业务不用传统数据库
PolarDB for PostgreSQL  有意思吗?有意思呀
PolarDB  Serverless POC测试中有没有坑与发现的疑问
临时工说:如果DBA大龄被裁员了怎么办?
临时工访谈:DBA 考PMP 有用没有用,访谈专业的项目管理人士的意见
临时工说:炮轰阿里云MongoDB司令部 低质高价技术差 你是要疯!!!!
MySQL 的SQL引擎很差吗?由一个同学提出问题引出的实验
临时工访谈:从国产数据库 到 普罗大众的产品 !与在美国创业软件公司老板对话
PolarDB 数据库架构 测试 serverless 后的 三字真言  稳定,灵活,省钱(的用对地方)
PostgreSQL 如何通过工具来分析PG 内存泄露
MySQL 的SQL引擎很差吗?由一个同学提出问题引出的实验
临时工访谈:我很普通,但我也有生存的权利,大龄程序员 求职贴
PolarDB  Serverless POC测试中有没有坑与发现的疑问
临时工访谈:PolarDB  Serverless  发现“大”问题了  之 灭妖记 续集
临时工访谈:庙小妖风大-PolarDB 组团镇妖 之 他们是第一
临时工说: 快速识别 “海洋贝壳类” 数据库方法速递
临时工说:国产 数据库 销售人员  图鉴
MongoDB 不是软柿子,想替换就替换
PostgreSQL PG_DUMP 工作失败了怎么回事及如何处理
MySQL 八怪(高老师)现场解决问题实录
PostgreSQL 为什么也不建议 RR隔离级别,MySQL别笑
临时工访谈:OceanBase上海开大会,我们四个开小会 OB 国产数据库破局者
MONGODB  ---- Austindatabases  历年文章合集
MYSQL  --Austindatabases 历年文章合集
POSTGRESQL --Austindatabaes 历年文章整理
POLARDB  -- Ausitndatabases 历年的文章集合
PostgreSQL  查询语句开发写不好是必然,不是PG的锅
SQL SERVER 如何实现UNDO REDO  和PostgreSQL 有近亲关系吗
MongoDB 2023纽约 MongoDB 大会 -- 我们怎么做的新一代引擎 SBE Mongodb 7.0双擎力量(译)

Austindatabases 公众号,主要围绕数据库技术(PostgreSQL, MySQL, Mongodb, Redis, SqlServer,PolarDB, Oceanbase 等)和职业发展,国外数据库大会音译,国外大型IT信息类网站文章翻译,等,希望能和您共同发展。



文章转载自AustinDatabases,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论