a bit more precise MaxOffsetNumber - Mailing list pgsql-hackers

From Tomas Vondra
Subject a bit more precise MaxOffsetNumber
Date
Msg-id 4DBCC2A0.2060406@fuzzy.cz
Whole thread Raw
Responses Re: a bit more precise MaxOffsetNumber  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Hi,

I've been digging in the sources, and I've noticed the MaxOffsetNumber
is defined (in storage/off.h) like this
 (BLCKSZ / sizeof(ItemIdData))

I guess it might be made a bit more precise by subtracting the header
like this
 (BLCKSZ - offsetof(PageHeaderData, pd_linp) / sizeof(ItemIdData))

although the difference is negligible (2048 vs 2042 for 8kB pages).


Tomas


pgsql-hackers by date:

Previous
From: Jaime Casanova
Date:
Subject: Re: Proposed patch: Smooth replication during VACUUM FULL
Next
From: Tomas Vondra
Date:
Subject: a bit strange btree index tuples