model-writtenrun 8204 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Christophe Pettus reported inflated row estimates even after vacuuming and analyzing empty tables in #1; David Rowley explained the ten-page fallback and its inability to distinguish empty tables from unexamined ones in #2, while Tom Lane defended conservative estimates as protection against disastrous nested-loop plans in #3.
- Christophe proposed a storage parameter for persistently empty tables in #4, and Pavel Stehule described production workloads suffering from this behavior in #5; Tom then proposed either invalidating cached plans when the first page appears or recording relpages=1 after vacuuming an empty table in #7.
- Tom abandoned the first-page invalidation experiment after widespread regression-plan changes and attached the relpages=1 approach, which left existing regression tests unchanged, in #9; David reiterated the need for cautious estimates before statistics collection in #10.
- Pavel supplied an independent, longstanding workaround exposing the minimum-page estimate through a fake_pages GUC in #11.
- Tom rejected the global tuning knob and superseded his own relpages workaround with reltuples=-1 for unknown row counts in #12, retaining the ten-page safeguard until VACUUM or ANALYZE establishes statistics and accepting an FDW API change so foreign tables can distinguish unknown from empty.
- Justin Pryzby described an inheritance-based workaround in #14, while Pavel assessed the replacement's limited impact in #15 and reported passing tests before marking it ready for commit in #16.
- Tom committed #12 as 3d351d916b with only an additional catalog-version bump and announced the push in #17; Pavel's thanks in #18 closed the thread with the replacement landed and neither earlier workaround adopted.