Skip site navigation (1) Skip section navigation (2)

Re: bug in pageinspect contrib modul

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: bug in pageinspect contrib modul
Date: 2008-10-23 10:06:08
Message-ID: 49004C90.3080507@sun.com (view raw or flat)
Thread:
Lists: pgsql-bugs
Heikki Linnakangas napsal(a):
> Zdenek Kotala wrote:
>> The following code is in btreefuncs.c function GetBTPageStatistics:
>>
>> stat->max_avail = BLCKSZ - (BLCKSZ - phdr->pd_special + 
>> SizeOfPageHeaderData);
>>
>> I think it should be:
>>
>> stat->max_avail = BLCKSZ - (phdr->pd_special + SizeOfPageHeaderData);
> 
> Umm, I don't think so. pd_special is the offset to the start of the 
> special area, so (BLCKSZ - pd_special) is the size of the special area.
> 
> However, that max_avail field actually looks like dead code, anyway.

Yeah, you are right. I forgot that pd_special does not contain size but offset.

	Thanks Zdenek



-- 
Zdenek Kotala              Sun Microsystems
Prague, Czech Republic     http://sun.com/postgresql


In response to

pgsql-bugs by date

Next:From: Viraj KanwadeDate: 2008-10-23 16:46:34
Subject: bug with psql 8.3.3 on ubuntu
Previous:From: Zdenek KotalaDate: 2008-10-23 10:04:02
Subject: Re: Upgrade from 7.4.5 to 8.3.3

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group