https://bugs.openldap.org/show_bug.cgi?id=9388
Issue ID: 9388 Summary: mdb_stat for DupSort DBI shows incorrect data Product: LMDB Version: 0.9.26 Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: --- Component: liblmdb Assignee: bugs@openldap.org Reporter: AskAlexSharov@gmail.com Target Milestone: ---
It doesn't include pages pages used for values.
https://bugs.openldap.org/show_bug.cgi?id=9388
--- Comment #1 from tina@tina.pm --- I can confirm this issue. I have recently noticed that some of my named databases were reporting ridiculously low sizes.
For example, according to this, each entry takes about 0.9 byte, but the keys are all 21 bytes in length, and the average size of the values is around 17 bytes.
Status of xxxx Tree depth: 4 Branch pages: 269 Leaf pages: 24773 Overflow pages: 0 Entries: 1102749228
This one is not so bad, reports just over 8 bytes per entry. But in fact, both the key and the value for each entry are 8 bytes each:
Status of zzzz Tree depth: 3 Branch pages: 34 Leaf pages: 7392 Overflow pages: 0 Entries: 3623319
https://bugs.openldap.org/show_bug.cgi?id=9388
Howard Chu hyc@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |TEST Status|UNCONFIRMED |RESOLVED
--- Comment #2 from Howard Chu hyc@openldap.org --- Fixed in git
https://bugs.openldap.org/show_bug.cgi?id=9388
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |0.9.36 Assignee|bugs@openldap.org |hyc@openldap.org
--- Comment #3 from Quanah Gibson-Mount quanah@openldap.org --- mdb.RE/0.9:
• 745b85ad by Howard Chu at 2026-04-27T17:29:10+01:00 ITS#9388 LMDB: fix mdb_stat page counts for dupsort DBs
mdb.master:
• b048b7eb by Howard Chu at 2026-04-27T17:29:02+01:00 ITS#9388 LMDB: fix mdb_stat page counts for dupsort DBs
mdb.master3:
• 25f9efab by Howard Chu at 2026-04-27T17:28:19+01:00 ITS#9388 LMDB: fix mdb_stat page counts for dupsort DBs