a bit more precise MaxOffsetNumber

From: Tomas Vondra <tv(at)fuzzy(dot)cz>
To: pgsql-hackers(at)postgresql(dot)org
Subject: a bit more precise MaxOffsetNumber
Date: 2011-05-01 02:17:04
Message-ID: 4DBCC2A0.2060406@fuzzy.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2011-05-01 02:30:53 a bit strange btree index tuples
Previous Message Jaime Casanova 2011-05-01 00:37:10 Re: Proposed patch: Smooth replication during VACUUM FULL