From 46d770c4caecced1aac5f3308381df1fc067ab96 Mon Sep 17 00:00:00 2001 From: Julien Rouhaud Date: Wed, 2 Sep 2015 19:09:08 +0200 Subject: [PATCH] Small fix of btree size estimation --- hypopg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hypopg.c b/hypopg.c index a352f2f..fa8a689 100644 --- a/hypopg.c +++ b/hypopg.c @@ -1509,7 +1509,7 @@ hypo_estimate_index(hypoEntry *entry, RelOptInfo *rel) +(sizeof(IndexTupleData) * entry->ncolumns) + MAXALIGN(sizeof(ItemIdData) * entry->ncolumns); - usable_page_size = BLCKSZ - sizeof(PageHeaderData) - sizeof(BTPageOpaqueData); + usable_page_size = BLCKSZ - SizeOfPageHeaderData - sizeof(BTPageOpaqueData); bloat_factor = (200.0 - (fillfactor == 0 ? BTREE_DEFAULT_FILLFACTOR : fillfactor) + additional_bloat) / 100;