PG v12
《深入浅出PostgreSQL》基于PostgreSQL 12版本。
目前 PostgreSQL 最新稳定版本为 14,可以说 13/14 两个版本的变化不是特别大,可以在完成本课程的学习之后,专项研究一下 13/14 两个版本的新特性。
可以通过 PG 官方提供的特性矩阵来快速了解有哪些新特性。
比如,对比 15,14,13,12 这四个大版本,可以得下面的矩阵(示例)。


具体可查看官网:https://www.postgresql.org/about/featurematrix/
获取安装包
课程中介绍了4种获取安装包的途径,
1,通过官网下载获取:https://www.postgresql.org/download/
2,配置 Yum 源安装:https://yum.postgresql.org
3,通过 FTP 下载:https://www.postgresql.org/ftp/source/
4,通过 EDB 站点下载:https://www.enterprisedb.com/software-downloads-postgres
除此之外,
1,还可以通过直接下载源码,自行编译安装:https://github.com/postgres/postgres
2,担心网速问题,还可以通过国内站点 gitee 下载源码:https://gitee.com/shawnyan/postgres
3,配置国内 Yum 源,以阿里云为例:https://mirrors.aliyun.com/postgresql/
4,使用 Percona 发行版:https://www.percona.com/downloads/postgresql-downloads
PostgreSQL 13 新特性
PostgreSQL 13 新特性列举如下:
- EXPLAIN (WAL) support
- B-tree deduplication
- FETCH FIRST … WITH TIES
- CREATE STATISTICS - “OR” and “IN/ANY” statistics
- Hash aggregation can use disk
- Incremental sort
- SQL/JSON: datetime()
- Configure max WAL retention for replication slots
- Logical replication for partitioned tables
- Verify backup integrity (pg_verifybackup)
- Client can require SCRAM channel binding
- Inserted data can trigger autovacuum
- Parallelized VACUUM for Indexes
- Certificate authentication with postgres_fdw
- Trusted Extensions
PostgreSQL 14 新特性
PostgreSQL 14 新特性列举如下:
- Multiranges
- B-tree bottom-up index deletion
- Incremental sort for window functions
- LZ4 compression for TOAST tables
- Query pipelining
- JSONB Subscripting
- Logical replication stream in-progress transactions
- Foreign data wrapper query parallelism
- Import foreign table partitions
- Parallel query execution on remote databases
- BEGIN ATOMIC function bodies
- Query parallelism for RETURN QUERY
PostgreSQL 15 新特性
前段时间墨天轮举办了“PostgreSQL 15 新版本尝鲜”征文活动,已经有很多大佬对新特性做了解读和分享,
具体文章可以参看合辑链接:https://www.modb.pro/topic/406267




