if pd_lower > pd_upper, rather than merely claiming to. This would
only matter if the page header were corrupt, which shouldn't occur,
but ...
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/storage/page/bufpage.c,v 1.77 2008/01/01 19:45:52 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/storage/page/bufpage.c,v 1.78 2008/02/10 20:39:08 tgl Exp $
*
*-------------------------------------------------------------------------
*/
space = (int) ((PageHeader) page)->pd_upper -
(int) ((PageHeader) page)->pd_lower;
+ if (space < 0)
+ return 0;
+
return (Size) space;
}