Production query plans without production data
Summary
A practical guide to exporting and restoring optimizer statistics in PostgreSQL 18 to reproduce production query plans in non-production environments, using pg_restore_relation_stats and pg_restore_attribute_stats, with workflow steps and safety caveats.