Re: page macros cleanup
"Pavan Deolasee" <[email protected]>
| Newsgroups | gmane.comp.db.postgresql.devel.patches |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Jul 4, 2008 at 3:37 PM, Heikki Linnakangas <[email protected]> wrote: > > > I think this is the way it should be: > > #define HashMaxItemSize \ > (BLCKSZ - \ > SizeOfPageHeaderData - \ > MAXALIGN(sizeof(HashPageOpaqueData)) - \ > sizeof(ItemIdData)) > I am wondering if this would fail for corner case if HashMaxItemSize happened to be unaligned. For example, if (itemsz < HashMaxItemSize < MAXALIGN(itemsz), PageAddItem() would later fail with a not-so-obvious error. Should we just MAXALIGN_DOWN the HashMaxItemSize ? Thanks, Pavan -- Pavan Deolasee EnterpriseDB http://www.enterprisedb.com -- Sent via pgsql-patches mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-patches