Why we don't panic in PageGetExactFreeSpace

From: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Why we don't panic in PageGetExactFreeSpace
Date: 2008-08-05 17:42:53
Message-ID: 4898911D.9000006@sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The PageGetExactFreeSpace function contains following code:

00486 space = (int) ((PageHeader) page)->pd_upper -
00487 (int) ((PageHeader) page)->pd_lower;
00488
00489 if (space < 0)
00490 return 0;

It seems to me that we should panic that data are overlaped instead of return
zero. See PageHeaderIsValid for reference.

Any comments?

Zdenek

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2008-08-05 18:17:57 Re: DROP DATABASE always seeing database in use
Previous Message Nikolae Shevchenco (md) 2008-08-05 17:33:59 unable to build libpq on Win 2003 (32 bit)