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_hookadded (commit 896fcdb2)
数据类型更改
已添加
regcollationobject identifier type (commit a2b1faa0)xid8(commit aeec457d)
已修改
移除
- support for the deprecated
opaquepseudo-type removed (commit bb03010b)
索引更改
通用
- incremental sorting added (commit d2d8a229)
btree
- index deduplication added (initial commit 0d861bbb)
GIN
- avoid full scan of
GINindexes when possible (commit 4b754d6c) GINindexes can more efficiently handle!(NOT) clauses in tsquery searches (commit 4b754d6c)
Vacuum 更改
VACUUM PARALLELoption added (commit 40d964ec)Autovacuumcan 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)
分区更改
ROWexpressions 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)
BEFORErow-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 TABLEALTER FOREIGN TABLE ... RENAME COLUMNreturnsALTER FOREIGN TABLE(instead ofALTER TABLE) on successful command completion (commit 979766c0)
ALTER FUNCTIONNO DEPENDS ON EXTENSION语法已添加 (提交 5fc70394)
ALTER INDEXNO DEPENDS ON EXTENSION语法已添加 (提交 5fc70394)
ALTER MATERIALIZED VIEWALTER PROCEDURENO DEPENDS ON EXTENSION语法已添加 (提交 5fc70394)
ALTER ROUTINENO DEPENDS ON EXTENSION语法已添加 (提交 5fc70394)
ALTER STATISTICSALTER STATISTICS…SET STATISTICSclause added (commit d06215d0)…
ALTER TABLEALTER TABLE … ALTER COLUMN … DROP EXPRESSIONclause 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 TRIGGERNO DEPENDS ON EXTENSION语法已添加 (提交 5fc70394)
ALTER TYPEALTER TYPE ... SET ( property = value [, ... ] )syntax added (commit fe30e7eb)
ALTER VIEWALTER VIEW ... RENAME COLUMN ...syntax added (commit 30840c92)
CREATE DATABASELOCALEoption added, combining the existingLC_COLLATEandLC_CTYPEoptions (commit 06140c20)
CREATE EXTENSIONCREATE 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_itemsstorage parameter added (commit 0d861bbb)
CREATE LANGUAGE- removal of
pg_pltemplateand 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 VIEWUSING methodsyntax added (commit 8586bf7e)
CREATE PUBLICATION- parameter
publish_via_partition_rootadded (commit 83fd4532)
- parameter
CREATE TABLECREATE TABLE ... LIKEnow propagates aCHECKconstraint'sNO INHERITproperty to the created table (commit cacef172)
DROP DATABASE- can now take the option
FORCEto drop a database even if other users are connected (commit 1379fd53)
- can now take the option
EXPLAINWALoption added (commit 33e05f89)
SELECTFETCH FIRST n ROWS [ WITH TIES ]syntax added (commit 357889eb)
系统目录更改
表
已修改
pg_publication- column
pubviarootadded (commit 83fd4532)
- column
pg_statistic_ext- column
stxstattargetadded (commit d06215d0)
- column
pg_trigger- column
tgparentidadded (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
trustedadded (commit 50fc694e)
- column
pg_replication_slotspg_stat_activity- column
leader_pidadded (commit b025f32e)
- column
pg_stat_all_tables- column
n_ins_since_vacuumadded; applies topg_stat_sys_tablesandpg_stat_user_tablesas 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_modseffective_io_concurrency- value now used directly instead of being automatically adjusted (commit b09ff536)
log_line_prefix%bparameter added to show the backend type (commit 70a7b477)
max_files_per_process- minimum value changed from
25to64(commit 3d475515)
- minimum value changed from
ssl_min_server_version- default value changed from
1.0to1.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
GINindexes can more efficiently handle!(NOT) clauses in tsquery searches (commit 4b754d6c)
认证更改
- support for OpenSSL
0.9.8and1.0.0removed (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) walreceiverwill now use a temporary replication slot ifwal_receiver_create_temp_slotis set (initial commit 32973082)primary_conninfoandprimary_slot_name(as well as the newly addedwal_receiver_create_temp_slotparameter) 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_versionandssl_max_protocol_versionadded (initial commit ff8ca5fa) - connection parameter
channel_bindingadded (commit d6e612f8) - connection parameter
sslpasswordadded (commit e60b480d)
psql 更改
\warncommand 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)\doutput for TOAST tables improved (commit eb5472da)\enow inserts an unterminated query into psql's query buffer, making it possible to view or further edit the query before submission (commit d1c866e5)\gand\gxcan accept additional formatting options, e.g.\g (format=csv csv_fieldsep=',')(commit b63c293b)- "invisible"
PROMPT2prompt configuration option%wadded (commit 7f338369) %xincluded by default inPROMPT1andPROMPT2to show transaction status (commit dcdbb5a5)
服务器实用程序
pg_rewind- option
--write-recovery-confadded (commit 927474ce) - option
-c/--restore-target-walto 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-shutdowncan disable this (commit 5adafaf1)
- option
pg_upgrade- default new bindir is now the same location as the
pg_upgradebinary being executed, removing the need to explicitly specify-B newbindirin most cases (commit 959f6d6a)
- default new bindir is now the same location as the
pg_waldump
核心实用程序
createuser- deprecated options
--adduserand--no-adduserremoved (commit 4fa5edcd)
- deprecated options
dropdb- option
--forceadded (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-sizeadded (commit fab13dc5)
- backup manifests generated for base backups, which can be verified with the new utility
pgbench- options
--partitionsand--partition-methodadded (commit b1c1aa53) --init-stepsoption acceptsGto generate data on the server side, rather than have it generated by the client (commit a386942b)--show-scriptoption added to dump contents of built-in scripts (commit 5823677a)- command
\asetadded, like\gsetbut able to store all results from combined SQL queries into separate variables (commit 9d8ef988)
- options
pg_dump- option
--include-foreign-dataadded to dump data from foreign tables (commit 2f9eb313)
- option
reindexdb- option
--jobsadded (commit 5ab892c3)
- option
vacuumdb- option
--paralleladded (commit 47bc9ced)
- option
Contrib module changes
已修改
adminpack- function
pg_file_sync()added (commit d694e0bb)
- function
dict_intABSVALparameter added (commit 806eb92c)
ltreepageinspectpg_stat_statements- configuration option
pg_stat_statements.track_utilityto track WAL usage statistics (commit 6b466bf5) - configuration option
pg_stat_statements.track_planningto track planning statistics (commit 17e03282) - support for tracking of planning statistics added (commit 17e03282)
- following
pg_stat_statementscolumns renamedtotal_time→total_exec_timemin_time→min_exec_timemax_time→max_exec_timemean_time→mean_exec_timestddev_time→stddev_exec_time
- following
pg_stat_statementscolumns addedplanstotal_plan_timemin_plan_timemax_plan_timemean_plan_timestddev_plan_time
- following
- support for WAL usage stastics tracking added (commit 6b466bf5)
- following additional columns added to the
pg_stat_statementsviewwal_recordswal_fpiwal_bytes
- following additional columns added to the
- configuration option
postgres_fdw- options
sslkeyandsslcertadded 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_ginbtree_gistcitextcubedict_intearthdistancefuzzystrmatchhstorehstore_plperlintarrayisnjsonb_plperlloltreepg_trgmpgcryptosegtablefunctcntsm_system_rowstsm_system_timeunaccentuuid-ossp
其他更改
- support for non-ELF BSD systems removed (commit c72f9b95)
测试
pg_regress
- option
--load-languageremoved (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).
