
Plan flips
From Postgres FM by Nikolay Samokhvalov and Michael Christofides
March 6, 2026 · 43 min · Episode 173
About this episode
Nik and Michael discuss query plan flips in Postgres, their causes, mitigations, and a recent outage at Clerk.
Nik and Michael discuss query plan flips in Postgres — what they are, some causes, mitigations, longer term solutions, and the recent outage at Clerk. Here are some links to things they mentioned: Recent postmortem from Clerk https://clerk.com/blog/2026-02-19-system-outage-postmortem The real cost of random I/O (blog post by Tomas Vondra) https://vondra.me/posts/the-real-cost-of-random-io autovacuum_analyze_scale_factor https://www.postgresql.org/docs/current/runtime-config-vacuum.html#GUC-AUTOVACUUM-ANALYZE-SCALE-FACTOR default_statistics_target https://www.postgresql.org/docs/current/runtime-config-query.html#GUC-DEFAULT-STATISTICS-TARGET pg_hint_plan https://github.com/ossc-db/pg_hint_plan Aurora PostgreSQL query plan management https://docs.aws.amazon.comAmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Optimize.Start.html pg_stat_plans https://github.com/pganalyze/pg_stat_plans pg_plan_alternatives https://jnidzwetzki.github.io/2026/03/04/pg-plan-alternatives.html Waiting for Postgres 19: Better Planner Hints with Path Generation Strategies https://pganalyze.com/blog/5mins-postgres-19-better-planner-hints ~~~ What did you like or not like? What should we discuss next time…
People in this episode
Hosts: Nikolay Samokhvalov, Michael Christofides
Topics covered
- query plan flips
- Postgres
- system outage
- mitigations
- longer term solutions
Keywords
- query plan
- Postgres
- outage
- mitigation
- statistics target
- random I/O
- autovacuum
Mentioned in this episode
Organizations: Clerk, pgMustard, Postgres.ai, Amazon RDS, pg_stat_plans, pg_hint_plan, Aurora PostgreSQL, pganalyze, pg_plan_alternatives, Postgres FM
More episodes of Postgres FM
- autovacuum · May 29, 2026 · 46 min
- pg_flight_recorder · May 15, 2026 · 43 min
- PgQue · May 8, 2026 · 47 min
- pg_wait_tracer · April 24, 2026 · 44 min
- Schema design checklist · April 17, 2026 · 45 min
- What’s Missing in Postgres? · April 3, 2026 · 44 min
Explore listener stats, chart rankings, contacts and more on the Postgres FM podcast page.