PostgreSQL 13
- 发行说明 (源文件)
- 发布日期:2020-09-24 (版本公告)
- 当前次要版本:13.22 (2025-08-14)
- EOL:2025-11
- 文档:PostgreSQL 13 (索引)
- GIT 分支:REL_13_STABLE
次要版本发布
- 13.22 (2025-08-14; 发行说明; 公告)
- 13.21 (2025-05-08; 发行说明; 公告)
- 13.20 (2025-02-20; 发行说明; 公告)
- 13.19 (2025-02-13; 发行说明; 公告)
- 13.18 (2024-11-21; 发行说明; 公告)
- 13.17 (2024-11-14; 发行说明; 公告)
- 13.16 (2024-08-08; 发行说明; 公告)
- 13.15 (2024-05-09; 发行说明; 公告)
- 13.14 (2024-02-08); 发行说明, 公告)
- 13.13 (2023-11-09); 发行说明, 公告)
- 13.12 (2023-08-10; 发行说明, 公告)
- 13.11 (2023-05-11; 发行说明, 公告)
- 13.10 (2023-02-09; 发行说明, 公告)
- 13.9 (2022-11-10; 发行说明, 公告)
- 13.8 (2022-08-11; 发行说明, 公告)
- 13.7 (2021-05-12; 发行说明, 公告)
- 13.6 (2021-02-10; 发行说明, 公告)
- 13.5 (2021-11-11; 发行说明, 公告)
- 13.4 (2021-08-12; 发行说明, 公告)
- 13.3 (2021-05-13; 发行说明, 公告)
- 13.2 (2021-02-11; 发行说明, 公告)
- 13.1 (2020-11-12; 发行说明, 公告)
后端更改
通用
- promotion of a standby will take priority over paused recovery (commit 496ee647)
openssl_tls_init_hook
added (commit 896fcdb2)
数据类型更改
已添加
regcollation
object identifier type (commit a2b1faa0)xid8
(commit aeec457d)
已修改
移除
- support for the deprecated
opaque
pseudo-type removed (commit bb03010b)
索引更改
通用
- incremental sorting added (commit d2d8a229)
btree
- index deduplication added (initial commit 0d861bbb)
GIN
- avoid full scan of
GIN
indexes when possible (commit 4b754d6c) GIN
indexes can more efficiently handle!
(NOT
) clauses in tsquery searches (commit 4b754d6c)
Vacuum 更改
VACUUM PARALLEL
option added (commit 40d964ec)Autovacuum
can now be triggered by the number of INSERT operations (commit b07642db)- additional information about errors encountered during a vacuum operation will be displayed (commit b61d161c)
日志记录更改
- maximum length of parameters logged for prepared statement can now be set (commit 0b34e7d3)
- CSV log output includes the backend type (commit 70a7b477)
分区更改
ROW
expressions can now be used to define partitions (commit bb4114a4)- expanded range of cases where partition pruning can be applied (commit 4e85642d)
- expanded range of cases where partitionwise joins can be applied (commits c8434d64 and 981643dc)
BEFORE
row-level triggers permitted on partitioned tables (commit 487e9861)- partitioned tables can be logically replicated via publications (commits 17b9e7f9 and 83fd4532)
- partitioned tables can now be replication targets in logical replication (commit f1ac27bf)
SQL 更改
已修改
ALTER FOREIGN TABLE
ALTER FOREIGN TABLE ... RENAME COLUMN
returnsALTER FOREIGN TABLE
(instead ofALTER TABLE
) on successful command completion (commit 979766c0)
ALTER FUNCTION
NO DEPENDS ON EXTENSION
语法已添加 (提交 5fc70394)
ALTER INDEX
NO DEPENDS ON EXTENSION
语法已添加 (提交 5fc70394)
ALTER MATERIALIZED VIEW
ALTER PROCEDURE
NO DEPENDS ON EXTENSION
语法已添加 (提交 5fc70394)
ALTER ROUTINE
NO DEPENDS ON EXTENSION
语法已添加 (提交 5fc70394)
ALTER STATISTICS
ALTER STATISTICS
…
SET STATISTICS
clause added (commit d06215d0)…
ALTER TABLE
ALTER TABLE … ALTER COLUMN … DROP EXPRESSION
clause added to convert a generated column to a normal column (commit f595117e)- support for foreign key constraints using pre-PostgreSQL 7.3 syntax removed (commit e58a5997)
ALTER TRIGGER
NO DEPENDS ON EXTENSION
语法已添加 (提交 5fc70394)
ALTER TYPE
ALTER TYPE ... SET ( property = value [, ... ] )
syntax added (commit fe30e7eb)
ALTER VIEW
ALTER VIEW ... RENAME COLUMN ...
syntax added (commit 30840c92)
CREATE DATABASE
LOCALE
option added, combining the existingLC_COLLATE
andLC_CTYPE
options (commit 06140c20)
CREATE EXTENSION
CREATE EXTENSION … FROM …
syntax removed (commit 70a77320)
CREATE INDEX
- support for opclass parameters added (commit 911e7020)
- implicit support for long-deprecated pre-PostgreSQL 8.0 opclass names removed (commit 84eca14b)
deduplicate_items
storage parameter added (commit 0d861bbb)
CREATE LANGUAGE
- removal of
pg_pltemplate
and creation of the concept of trusted extensions makes it possible for untrusted versions of non-core languages to be installed (commit 50fc694e)
- removal of
CREATE MATERIALIZED VIEW
USING method
syntax added (commit 8586bf7e)
CREATE PUBLICATION
- parameter
publish_via_partition_root
added (commit 83fd4532)
- parameter
CREATE TABLE
CREATE TABLE ... LIKE
now propagates aCHECK
constraint'sNO INHERIT
property to the created table (commit cacef172)
DROP DATABASE
- can now take the option
FORCE
to drop a database even if other users are connected (commit 1379fd53)
- can now take the option
EXPLAIN
WAL
option added (commit 33e05f89)
SELECT
FETCH FIRST n ROWS [ WITH TIES ]
syntax added (commit 357889eb)
系统目录更改
表
已修改
pg_publication
- column
pubviaroot
added (commit 83fd4532)
- column
pg_statistic_ext
- column
stxstattarget
added (commit d06215d0)
- column
pg_trigger
- column
tgparentid
added (commit b9b408c4)
- column
移除
pg_pltemplate
(commit 50fc694e)
视图
已添加
pg_shmem_allocations
(commit ed10f32e)pg_stat_slru
(commit 28cac71b)pg_stat_progress_analyze
(commit a166d408)pg_stat_progress_basebackup
(commit e65497df)
已修改
pg_available_extension_versions
- column
trusted
added (commit 50fc694e)
- column
pg_replication_slots
pg_stat_activity
- column
leader_pid
added (commit b025f32e)
- column
pg_stat_all_tables
- column
n_ins_since_vacuum
added; applies topg_stat_sys_tables
andpg_stat_user_tables
as well (commit b07642db)
- column
pg_stat_gssapi
- only shows processes with a connection, i.e. excluding various auxiliary processes which do not receive network connections (commit 5c46e7d8)
- only shows processes with a connection, i.e. excluding various auxiliary processes which do not receive network connections (commit 5c46e7d8)
pg_stat_ssl
- only shows processes with a connection, i.e. excluding various auxiliary processes which do not receive network connections (commit 5c46e7d8)
pg_stat_wal_receiver
系统函数更改
已添加
gen_random_uuid()
(commit 5925e554)gcd()
(commit 13661ddd)jsonb_set_lax()
(commit a83586b5)jsonb_path_exists_tz()
(commit bffe1bd6)jsonb_path_match_tz()
(commit bffe1bd6)jsonb_path_query_array_tz()
(commit bffe1bd6)jsonb_path_query_first_tz()
(commit bffe1bd6)jsonb_path_query_tz()
(commit bffe1bd6)lcm()
(commit 13661ddd)min_scale()
(commit 20d6225d)normalize()
(commit 2991ac5f)pg_current_snapshot()
(commit 4c04be9b)pg_current_xact_id()
(commit 4c04be9b)pg_current_xact_id_if_assigned()
(commit 4c04be9b)pg_snapshot_xip()
(commit 4c04be9b)pg_snapshot_xmax()
(commit 4c04be9b)pg_snapshot_xmin()
(commit 4c04be9b)pg_stat_reset_slru()
(commit 28cac71b)pg_visible_in_snapshot()
(commit 4c04be9b)pg_xact_status()
(commit 4c04be9bto_regcollation()
(commit 0886fc6a)trim_scale()
(commit 20d6225d)
配置更改
已添加
autovacuum_vacuum_insert_scale_factor
(commit b07642db)autovacuum_vacuum_insert_threshold
(commit b07642db)backtrace_functions
(commit 71a8a4f6)enable_incremental_sort
(commit d2d8a229)hash_mem_multiplier
(commit d6c08e29)ignore_invalid_pages
(commit 41c184bc)logical_decoding_work_mem
(commit cec2edfa)log_min_duration_sample
(commit 6e3e6cc0)log_parameter_max_length
(commit 0b34e7d3)log_parameter_max_length_on_error
(commit 0b34e7d3)log_statement_sample_rate
(commit 6e3e6cc0)maintenance_io_concurrency
(commit fc34b0d9)max_slot_wal_keep_size
(commit c6550776)wal_receiver_create_temp_slot
(commit 32973082)wal_skip_threshold
(commit c6b92041)
已修改
allow_system_table_mods
effective_io_concurrency
- value now used directly instead of being automatically adjusted (commit b09ff536)
log_line_prefix
%b
parameter added to show the backend type (commit 70a7b477)
max_files_per_process
- minimum value changed from
25
to64
(commit 3d475515)
- minimum value changed from
ssl_min_server_version
- default value changed from
1.0
to1.2
(commit b1abfec8)
- default value changed from
ssl_passphrase_command
- setting now only available to superusers and members of the default role
pg_read_all_settings
(commit d9249441)
- setting now only available to superusers and members of the default role
track_activity_query_size
- maximum value raised to 1MB (commit 81472785)
wal_keep_segments
- renamed to
wal_keep_size
(commit f5dff459)
- renamed to
索引更改
GIN
GIN
indexes can more efficiently handle!
(NOT
) clauses in tsquery searches (commit 4b754d6c)
认证更改
- support for OpenSSL
0.9.8
and1.0.0
removed (commit 7b283d0e)
全文搜索更改
- word stemming support for Greek, and improvements to Danish and French stemmers added (commit 7b925e12)
复制更改
- the amount of WAL reserved by replication slots can now be restricted with the new GUC parameter
max_slot_wal_keep_size
(commit c6550776) walreceiver
will now use a temporary replication slot ifwal_receiver_create_temp_slot
is set (initial commit 32973082)primary_conninfo
andprimary_slot_name
(as well as the newly addedwal_receiver_create_temp_slot
parameter) can be altered with a configuration reload, meaning a standby no longer has to be restarted in order to follow a new primary or upstream node (commit 1e614803)- recovery will now fail if a defined recovery target is not reached (commit dc788668)
- partitioned child tables can now be added automatically to logical replication publications (initial commit 17b9e7f9)
- partitioned child tables can now be added as logical replication targets (f1ac27bf)
libpq 更改
- connection parameters
ssl_min_protocol_version
andssl_max_protocol_version
added (initial commit ff8ca5fa) - connection parameter
channel_binding
added (commit d6e612f8) - connection parameter
sslpassword
added (commit e60b480d)
psql 更改
\warn
command added (commit 02e95a50)- following operator-related slash commands added (commit b0b5e20c)
\dAc
- list operator classes\dAf
- list operator families\dAo
- list operators of operator families\dAp
- list procedures of operator families
\d+
now shows whether an object is permanent, temporary or unlogged (commit 9a2ea618)\d
output for TOAST tables improved (commit eb5472da)\e
now inserts an unterminated query into psql's query buffer, making it possible to view or further edit the query before submission (commit d1c866e5)\g
and\gx
can accept additional formatting options, e.g.\g (format=csv csv_fieldsep=',')
(commit b63c293b)- "invisible"
PROMPT2
prompt configuration option%w
added (commit 7f338369) %x
included by default inPROMPT1
andPROMPT2
to show transaction status (commit dcdbb5a5)
服务器实用程序
pg_rewind
- option
--write-recovery-conf
added (commit 927474ce) - option
-c
/--restore-target-wal
to use the target server's restore_command to retrieve required WAL (commit a7e8ece4) - crash recovery will now be run automatically before rewinding, option
--no-ensure-shutdown
can disable this (commit 5adafaf1)
- option
pg_upgrade
- default new bindir is now the same location as the
pg_upgrade
binary being executed, removing the need to explicitly specify-B newbindir
in most cases (commit 959f6d6a)
- default new bindir is now the same location as the
pg_waldump
核心实用程序
createuser
- deprecated options
--adduser
and--no-adduser
removed (commit 4fa5edcd)
- deprecated options
dropdb
- option
--force
added (commit 80e05a08)
- option
pg_basebackup
- backup manifests generated for base backups, which can be verified with the new utility
pg_verifybackup
(commit 0d8c9c12) - total estimated backup size displayed by default (commit fab13dc5)
- option
--no-estimate-size
added (commit fab13dc5)
- backup manifests generated for base backups, which can be verified with the new utility
pgbench
- options
--partitions
and--partition-method
added (commit b1c1aa53) --init-steps
option acceptsG
to generate data on the server side, rather than have it generated by the client (commit a386942b)--show-script
option added to dump contents of built-in scripts (commit 5823677a)- command
\aset
added, like\gset
but able to store all results from combined SQL queries into separate variables (commit 9d8ef988)
- options
pg_dump
- option
--include-foreign-data
added to dump data from foreign tables (commit 2f9eb313)
- option
reindexdb
- option
--jobs
added (commit 5ab892c3)
- option
vacuumdb
- option
--parallel
added (commit 47bc9ced)
- option
Contrib module changes
已修改
adminpack
- function
pg_file_sync()
added (commit d694e0bb)
- function
dict_int
ABSVAL
parameter added (commit 806eb92c)
ltree
pageinspect
pg_stat_statements
- configuration option
pg_stat_statements.track_utility
to track WAL usage statistics (commit 6b466bf5) - configuration option
pg_stat_statements.track_planning
to track planning statistics (commit 17e03282) - support for tracking of planning statistics added (commit 17e03282)
- following
pg_stat_statements
columns renamedtotal_time
→total_exec_time
min_time
→min_exec_time
max_time
→max_exec_time
mean_time
→mean_exec_time
stddev_time
→stddev_exec_time
- following
pg_stat_statements
columns addedplans
total_plan_time
min_plan_time
max_plan_time
mean_plan_time
stddev_plan_time
- following
- support for WAL usage stastics tracking added (commit 6b466bf5)
- following additional columns added to the
pg_stat_statements
viewwal_records
wal_fpi
wal_bytes
- following additional columns added to the
- configuration option
postgres_fdw
- options
sslkey
andsslcert
added at server and user mapping level to enable different users to authenticate with different certificates (commit f5fd995a) - passwordless non-superuser connections permitted, mainly to facilitate passwordless SSL authentication (commit 6136e94d)
- options
sepgsql
Following contrib modules marked as trusted extensions (commit eb67623c)
btree_gin
btree_gist
citext
cube
dict_int
earthdistance
fuzzystrmatch
hstore
hstore_plperl
intarray
isn
jsonb_plperl
lo
ltree
pg_trgm
pgcrypto
seg
tablefunc
tcn
tsm_system_rows
tsm_system_time
unaccent
uuid-ossp
其他更改
- support for non-ELF BSD systems removed (commit c72f9b95)
测试
pg_regress
- option
--load-language
removed (commit 751c63ce)
测试模块
已添加
dummy_index_am
(commit 640c1986)test_ginpostinglist
(commit bde7493d)
预发布测试版本
rc1
(REL_13_RC1
) - commit efea2b85 (2020-09-14); announcement (2020-09-17)beta3
(REL_13_BETA3
) - commit 1754a719 (2020-08-10); announcement (2020-08-13)beta2
(REL_13_BETA2
) - commit bc4d7817 (2020-06-22); announcement (2020-06-25)beta1
(REL_13_BETA1
) - commit 7966b798 (2020-05-18); announcement (2020-05-21)
Initial commit marking the start of PostgreSQL 13
development is 615cebc9 (2019-07-01).