The PostgreSQL Global Development Group announced PostgreSQL 12 on October 3, 2019. The release added SQL/JSON path expressions for querying JSON documents and stored generated columns, whose values are calculated from other columns and saved to disk. It also introduced a pluggable table-storage interface for developers building alternative storage methods. [shared-03ed6acce83a0bacef917af69439e5eb384487f7733b6a8e76f1e7e88de9f19a]
One query-planning change allows eligible common table expressions—named query blocks introduced with WITH—to be inlined. PostgreSQL 12 limits that behavior to nonrecursive, side-effect-free expressions referenced once. The release also reported improvements to B-tree indexes and partitioned-table operations. Its announcement cited an average 40% reduction in B-tree index space use in a fair-use TPC-C benchmark, alongside an overall query-performance gain. That benchmark result describes its test, not a general expectation for every database. [shared-03ed6acce83a0bacef917af69439e5eb384487f7733b6a8e76f1e7e88de9f19a]
For administrators, REINDEX CONCURRENTLY can rebuild indexes without blocking writes. The pg_checksums utility can enable or disable page checksums, but only while the cluster is offline. Just-in-time compilation (JIT), which compiles selected query expressions during execution, is enabled by default only in installations built or packaged with LLVM. The announcement establishes what shipped and the project's reported benchmark; it does not settle how much a particular workload will improve. Real-world results require testing against that workload and its configuration. [shared-03ed6acce83a0bacef917af69439e5eb384487f7733b6a8e76f1e7e88de9f19a]
