Crunchy Data Blog· Christopher Winslett ·
PostgreSQL 19: How Crunchy Data's Loading, Storage and Index Advice Has Changed
Postgres 19: How Our Advice Has Changed Since We Wrote It
Key Takeaway
Crunchy Data revisits its earlier posts on loading, storage, indexes and partitioning to see what still holds for PostgreSQL 19.
Upgrade note
Async reads improve heap scans, but index choice should still depend on selectivity, so retest BRIN against parallel scans on your own storage after upgrading.
Technical Breakdown · Distilled from the original source
Async reads and index trade-offs
- PostgreSQL 18 async I/O benefits sequential scans, bitmap heap scans, and vacuum. In 19,
io_min_workersandio_max_workersbound I/O worker autoscaling. Each parallel query worker can queue several reads. - After upgrading, compare BRIN and parallel scan plans on your own storage with
EXPLAIN (ANALYZE, BUFFERS, IO). JIT is off by default in 19; if analytical workloads rely on it, explicitly re-enable it and check the plans again.
COPY error handling and exports
- Keep using
COPYfor bulk loads. In 19,ON_ERROR SET_NULLpreserves the row and replaces the field that failed conversion with NULL. If the whole row should be dropped, useON_ERROR IGNOREwithREJECT_LIMITto cap tolerated rejects. - In 19,
COPY TOcan export all descendants directly from a partitioned root.FORMAT jsonemits newline-delimited JSON, whileFORCE_ARRAYwraps the result in one array.
TOAST compression and partition maintenance
- In 19, LZ4 is the default for newly written TOAST values. Neither an upgrade nor
REPACKrecompresses existing values.REPACK (CONCURRENTLY)requires a primary key or index-based replica identity and cannot run on a partitioned parent. - Partition merges and splits copy rows while holding an
ACCESS EXCLUSIVElock on the parent for the entire copy, so schedule them in a maintenance window for busy tables.
Source: Crunchy Data Blog· crunchydata.com
PG Radar summarizes verified changes and impact. Read the original post for full technical details and code samples.