| From: | Melanie Plageman <melanieplageman(at)gmail(dot)com> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Return NULL for unknown pgstattuple estimate |
| Date: | 2026-11-19 16:36:04 |
| Message-ID: | E1xU57D-00000000PGY-0xib@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Return NULL for unknown pgstattuple estimate
pgstattuple_approx() returns 0 when there is not enough information to
estimate the number of live tuples, making an unknown estimate
indistinguishable from an estimate of an empty table.
Return NULL for approx_tuple_count instead
Suggested-by: Lukas Fittl <lukas(at)fittl(dot)com>
Discussion: https://postgr.es/m/CAP53PkzhhC4yQtmBLGHz41-Bs3ZqtQdtYGjxMh_xcTK6Z7eU9Q%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/b443bc7406fd92f1f869cc700810ef9a17a01d82
Modified Files
--------------
contrib/pgstattuple/expected/pgstattuple.out | 4 ++--
contrib/pgstattuple/pgstatapprox.c | 10 +++++++---
contrib/pgstattuple/sql/pgstattuple.sql | 2 +-
doc/src/sgml/pgstattuple.sgml | 5 +++--
4 files changed, 13 insertions(+), 8 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | Nathan Bossart | 2026-11-19 15:21:08 | pgsql: Fix race in autovacuum freeze score calculations. |