Fix estimate_hash_bucket_stats avgfreq computation

Edit
ID 6528
Title Fix estimate_hash_bucket_stats avgfreq computation
CI (CFBot) Summary
Stats (from CFBot) Patch count: 1, First patch: +20−1, All patches: +20−1
Tags Bugfix
Created 2026-02-25 12:21:35
Last modified 2026-02-27 19:15:52 (2 weeks ago)
Latest email 2026-03-05 06:17:29 (1 week ago)
Status
PG19-Final (2026-03-01 – 2026-03-31): Needs review
Target version 19
Authors Joel Jacobson (joeljacobson)
Reviewers Become reviewer
Committer Tom Lane (tgl)
Links
Emails
[BUG?] estimate_hash_bucket_stats uses wrong ndistinct for avgfreq
First at 2026-02-24 18:21:06 by "Joel Jacobson" <joel at compiler.org>
Latest at 2026-03-05 06:17:29 by "Joel Jacobson" <joel at compiler.org>
Latest attachment (fix-stanullfrac.patch) at 2026-03-03 15:05:29 from "Joel Jacobson" <joel at compiler.org>
    Attachment (fix-stanullfrac.patch) at 2026-03-03 15:05:29 from "Joel Jacobson" <joel at compiler.org> (Patch: Yes)
    Attachment (estimate_hash_bucket_stats-test.patch) at 2026-03-02 08:39:15 from "Joel Jacobson" <joel at compiler.org> (Patch: Yes)
    Attachment (v2-fix-estimate_hash_bucket_stats.patch) at 2026-03-01 21:12:22 from Tom Lane <tgl at sss.pgh.pa.us> (Patch: Yes)
    Attachment (fix-estimate_hash_bucket_stats.patch) at 2026-02-28 21:27:45 from "Joel Jacobson" <joel at compiler.org> (Patch: Yes)
    Attachment (0001-Fix-estimate_hash_bucket_stats-to-use-filtered-ndist.patch) at 2026-02-24 18:21:06 from "Joel Jacobson" <joel at compiler.org> (Patch: Yes)
History
When Who What
2026-03-05 15:46:28 CFbot Patch does not need rebase anymore
2026-03-03 15:46:30 CFbot Patch needs rebase
2026-02-27 19:15:52 Tom Lane (tgl) Added tgl as committer
2026-02-25 12:22:03 Joel Jacobson (joeljacobson) Changed name to Fix estimate_hash_bucket_stats avgfreq computation
2026-02-25 12:21:36 Joel Jacobson (joeljacobson) Attached mail thread 341b723c-da45-4058-9446-1514dedb17c1@app.fastmail.com
2026-02-25 12:21:36 Joel Jacobson (joeljacobson) Created patch record
Edit