Contents
- Minor version releases
- Major features
- Useful links
- SQL changes
- General changes
- Partitioning changes
- Compatibility changes
- Backend changes
- System catalogue changes
- System functions
- Data types
- Configuration changes
- Indexing changes
- Vacuum changes
- Replication changes
- Full text search
- Information schema changes
- Server utilities
- Core utilties
- psql changes
- Contrib modules
- Source code
- Testing
- Pre-release test versions
PostgreSQL 12
- Release notes (source file)
- Released: 2019-10-03 (release announcement)
- Current minor version: 12.13 (2022-11-10)
- EOL: 2024-11 (estimated)
- Documentation: PostgreSQL 12
- GIT branch: REL_12_STABLE
Minor version releases
- 12.13 (2022-11-10; release notes, announcement)
- 12.12 (2022-08-11; release notes, announcement)
- 12.11 (2022-05-12; release notes, announcement)
- 12.10 (2022-02-10; release notes, announcement)
- 12.9 (2021-11-11; release notes, announcement)
- 12.8 (2021-08-12; release notes, announcement)
- 12.7 (2021-05-13; release notes, announcement)
- 12.6 (2021-02-11; release notes, announcement)
- 12.5 (2020-11-12; release notes, announcement)
- 12.4 (2020-08-13; release notes, announcement)
- 12.3 (2020-05-14; release notes)
- 12.2 (2020-02-13; release notes)
- 12.1 (2019-11-14; release notes)
Major features
partitioning
performance enhancementsB-tree
indexing enhancementsREINDEX CONCURRENTLY
generated columns
- automatic (but overrideable) inlining of
common table expressions
- Progress reporting views for
CREATE INDEX
,REINDEX
,CLUSTER
, andVACUUM FULL
SQL/JSON path
support
Useful links
- PostgreSQL 12 observability (interactive chart from DataEgret)
SQL changes
General:
Common table expressions (CTE)
MATERIALIZED
/NOT MATERIALIZED
clauses to control materialization (commit 608b167f)
Modified:
ABORT
[ AND [ NO ] CHAIN ]
syntax added (commit 280a408b)
ALTER FOREIGN TABLE
ALTER FOREIGN TABLE ... SET WITH OIDS
syntax removed (commit 578b2297)- support for generated columns via the
GENERATED ALWAYS AS ... STORED
clause added (commit fc22b662)
ALTER FUNCTION
- option
SUPPORT
added (commit 1fb57af9)
- option
COMMIT
[ AND [ NO ] CHAIN ]
syntax added (commit 280a408b)
COPY
CREATE AGGREGATE
OR REPLACE
syntax added (commit 01bde4fa)
CREATE COLLATION
- option
DETERMINISTIC
added (commit 5e1963fb)
- option
CREATE FOREIGN TABLE
- support for generated columns via the
GENERATED ALWAYS AS ... STORED
clause added (commit fc22b662)
- support for generated columns via the
CREATE FUNCTION
- option
SUPPORT
added (commit 1fb57af9)
- option
CREATE TABLE AS
EXPLAIN
- option
SETTINGS
added (commit ea569d64)
- option
REINDEX
- option
CONCURRENTLY
added (5dc92b84)
- option
ROLLBACK
[ AND [ NO ] CHAIN ]
syntax added (commit 280a408b)
General changes
Optimizer
- most-common-value statistics option for
statistic objects
added (commit 7300a699)
Performance
avoids a table rewrite when changing betweenALTER TABLE ... SET DATA TYPE
timestamp
andtimestamptz
when the session time zone is UTC (commit 3c592630)ALTER TABLE ... SET NOT NULL
can avoid unnecessary table scans (commit bbb96c37)- the planner can replace an empty FROM clause with a dummy RTE, improving performance (commit 4be058fe)
Partitioning changes
ALTER TABLE ... ATTACH PARTITION
is now performed with reduced locking requirements (commit 898e5e32)
Compatibility changes
- OIDs are no longer be available as row-level attributes; the OID column on system catalogue tables has become an ordinary column
recovery.conf
items have been integrated into the main PostgreSQL configuration file structure (commit 2dedf4d9)jit
nowon
by default
Backend changes
Collation handling
- support for non-deterministic collations added (commit 5e1963fb)
Storage parameters
- Following storage parameters added:
System catalogue changes
Tables
General
- The
oid
column of all system catalogue tables is now exposed as a normal column (commit 578b2297). ALTER TABLE
can now be executed cleanly on system catalogue tables (commit 590a8702).
Added:
pg_statistic_ext_data
(commit 6cbfb784)
Modified:
pg_am
- supports table access methods in addition to index access methods (commit 8586bf7e)
pg_attrdef
- column
adsrc
removed (commit fe503823)
- column
pg_class
- column
relhasoids
removed
- column
pg_constraint
- consrc removed (commit 96b00c43)
pg_proc
column
protransform
renamed toprosupport
(commit 74dfe58a)
pg_statistic
- following columns added (commit 5e092800)
stacoll1
stacoll2
stacoll3
stacoll4
stacoll5
- following columns added (commit 5e092800)
pg_statistic_ext
- following columns removed (and incorporated into new table
pg_statistic_ext_data
, commit 6cbfb784):stxndistinct
stxdependencies
- following columns removed (and incorporated into new table
Views
Added:
pg_stats_ext
(commit aa087ec6)pg_stat_gssapi
(commit b0b39f72)pg_stat_progress_cluster
(commit 6f97457e)pg_stat_progress_create_index
(commit ab0dfc96)
Modified:
pg_stat_database
:pg_stat_replication
- column
reply_time
added (commit 7fee252f)
- column
pg_stat_ssl
System functions
Added:
acosh()
(commit f1d85aa9)asinh()
(commit f1d85aa9)atanh()
(commit f1d85aa9)cosh()
(commit f1d85aa9)jsonb_path_exists()
(commit 72b64603)jsonb_path_match()
(commit 72b64603)jsonb_path_query()
(commit 72b64603)jsonb_path_query_array()
(commit 72b64603)jsonb_path_query_first()
(commit 72b64603)log10()
(commit f1d85aa9)pg_copy_logical_replication_slot()
(commit 9f06d79e)pg_copy_physical_replication_slot()
(commit 9f06d79e)pg_ls_archive_statusdir()
(commit c4810162)pg_ls_tmpdir()
(commit 9cd92d1a)pg_partition_ancestors()
(commit b96f6b19)pg_partition_root()
(commit 3677a0b2)pg_partition_tree()
(commit d5eec4ee)pg_promote()
(commit 10074651)sinh()
(commit f1d85aa9)tanh()
(commit f1d85aa9)
Modified:
pg_config()
- function behavior marked as
stable
(previously:immutable
; commit 290e3b77)
- function behavior marked as
Data types
Added:
jsonpath
(initial commit 72b64603)
Removed:
Configuration changes
Added:
data_sync_retry
(backported as far as PostreSQL 9.4; commit 9ccdd7f6)default_table_access_method
(commit 8586bf7e)log_transaction_sample_rate
(commit 799e2203)plan_cache_mode
(commit f7cb2842)shared_memory_type
(commit f1bebef6)ssl_max_protocol_version
(commit e73e67c7)ssl_min_protocol_version
(commit e73e67c7)tcp_user_timeout
(commit 249d6499)wal_init_zero
(commit 475861b2)wal_recycle
(commit 475861b2)
Modified:
- The following items (former
recovery.conf
parameters) can now be changed with a reload (SIGHUP
) rather than a server restart (commit 13b89f96):archive_cleanup_command
promote_trigger_file
(formerlytrigger_file
)recovery_end_command
recovery_min_apply_delay
autovacuum_vacuum_cost_delay
- default reduced from 20ms to 2ms (commit cbccac37)
max_wal_senders
- this must now have the same or greater value on a standby as on its upstream (commit ea92368c)
recovery_target_timeline
- now defaults to
latest
rather thancurrent
(commit 0acb3bc3)
- now defaults to
Removed:
default_with_oids
(commit 578b2297)standby_mode
- (former recovery.conf parameter) replaced by
recovery.signal
andstandby.signal
files (commit 2dedf4d9)
- (former recovery.conf parameter) replaced by
Indexing changes
GIN
- WAL write overhead of
GIN
index creation reduced (commit 9155580f) GIN
support for@@
and@?
jsonpath operators added (commit 0a02e2ae)
Vacuum changes
VACUUM
optionINDEX_CLEANUP
added (commit a96c41fe)VACUUM
/ANALYZE
optionSKIP_LOCKED
added (commit 803b1301)VACUUM
optionTRUNCATE
added (commit b84dbc8e)
Replication changes
Replication slots
- Replication slots (both physical and logical) can now be copied (commit 9f06d79e)
Walreceiver
- if
cluster_name
is set,fallback_application_name
will be set to that value when connecting to the upstream node (commit 6ae578a9)
Replication configuration changes
recovery.conf
items have been integrated into the main PostgreSQL configuration file structure (commit 2dedf4d9).
Full text search
- word stemming support for Arabic, Indonesian, Irish, Lithuanian, Nepali, and Tamil added (commit fd582317)
Information schema changes
- object name columns (represented by the domain
sql_identifier
) are now based on theNAME
data type (initial commit 7c15cef8)
Server utilities
Added:
pg_checksums
(replacingpg_verify_checksums
; initial commit 6dd263cf)
Modified:
pg_ctl
pg_upgrade
pg_rewind
- option
-N
/--no-sync
added (commit 8a00b96a)
- option
Core utilties
Modified:
pg_basebackup
- option
--write-recovery-conf
will now write its configuration settings topostgresql.auto.conf
(commit 2dedf4d9)
- option
pgbench
pg_restore
- output no longer directed to
STDOUT
by default; "-f -
" must be specified explicitly (commit 413ccaa7)
- output no longer directed to
reindexdb
- option
--concurrently
added (commit 5dc92b84)
- option
vacuumdb
psql changes
\dP
command to list partitioned tables and indexes added (commit 1c5d9270)- CSV table output mode added (commit aa2ba50c)
- link to online manual page displayed in
psql
's\help
output (commit 27f3dea6)
Contrib modules
Modified:
auto_explain
- option
auto_explain.log_level
added (commit 2d36a5e9)
- option
citext
- 64-bit hash function for type citext added (commit 48c41fa9)
postgres_fdw
- expand the number of cases where
ORDER BY
sorts andLIMIT
clauses can be pushed to remote servers (commits d50d172e and ffab494a) - Improve optimizer cost accounting for
postgres_fdw
queries (commits 08d2d58a, 8b6da83d and edbcbe27) - Properly honour
WITH CHECK OPTION
on views that referencepostgres_fdw
tables (a45adc74)
- expand the number of cases where
pg_stat_statements
- statistics can now be reset for specific databases, users, and queries (commit 43cbedab)
vacuumlo
- options standardized to match those of core utilities (commit bfea331a)
Removed:
timetravel
example extension removed from thespi
contrib module
(commit 2d10defa)
Source code
- C99 support required (commit d9dd406f)
Testing
General
- following PGXS options added for controlling TAP and isolation tests (commit d3c09b9b):
TAP_TESTS
ISOLATION
ISOLATION_OPTS
Test modules
Added:
test_integerset
(commit df816f6a)test_misc
(commit 121e3cee)unsafe_tests
(commit c91504b9)
Pre-release test versions
rc1
- commit: 17822c0e (2019-09-23)beta4
- commit: 84bb33c4 (2019-09-09); announcement (2019-09-12)beta3
- commit: 7c45b994 (2019-08-05); announcement (2019-08-08)beta2
- commit: 0ab7110b (2019-06-17); announcement (2019-06-20)beta1
- commit: a240570b (2019-05-20); announcement (2019-05-23)
Initial commit marking the start of PostgreSQL 12
development is feced138 (2018-06-30).