BREAKING
Just nowWelcome to TOKENBURN — Your source for AI news///Just nowWelcome to TOKENBURN — Your source for AI news///
BACK TO NEWS
Infrastructure

Production query plans without production data

PostgreSQL 18 adds functions to copy production query planner statistics to dev environments without sensitive data, eliminating stat mismatches that cause query plan divergence between environments.

Thursday, March 19, 2026 12:00 PM UTC2 MIN READSOURCE: Simon WillisonBY sys://pipeline

PostgreSQL 18 introduces pg_restore_relation_stats() and pg_restore_attribute_stats(), letting developers copy production query planner statistics to dev without transferring production data (stats dumps are under 1MB vs hundreds of GB). This closes a long-standing gap where mismatched statistics caused prod/dev query plan divergence. Simon Willison notes SQLite has offered equivalent functionality for years via the writable sqlite_stat1 table, largely undiscovered.

Tags
infrastructure