postgresql/contrib/pageinspect
Tom Lane 27cef0a561 Check block number against the correct fork in get_raw_page().
get_raw_page tried to validate the supplied block number against
RelationGetNumberOfBlocks(), which of course is only right when
accessing the main fork.  In most cases, the main fork is longer
than the others, so that the check was too weak (allowing a
lower-level error to be reported, but no real harm to be done).
However, very small tables could have an FSM larger than their heap,
in which case the mistake prevented access to some FSM pages.
Per report from Torsten Foertsch.

In passing, make the bad-block-number error into an ereport not elog
(since it's certainly not an internal error); and fix sloppily
maintained comment for RelationGetNumberOfBlocksInFork.

This has been wrong since we invented relation forks, so back-patch
to all supported branches.
2014-07-22 11:46:29 -04:00
..
Makefile Add file version information to most installed Windows binaries. 2014-07-14 14:07:52 -04:00
btreefuncs.c Create function prototype as part of PG_FUNCTION_INFO_V1 macro 2014-04-18 00:03:19 -04:00
fsmfuncs.c Create function prototype as part of PG_FUNCTION_INFO_V1 macro 2014-04-18 00:03:19 -04:00
heapfuncs.c Create function prototype as part of PG_FUNCTION_INFO_V1 macro 2014-04-18 00:03:19 -04:00
pageinspect--1.0--1.1.sql Fix typo in update scripts for some contrib modules. 2013-07-19 04:13:01 +09:00
pageinspect--1.1--1.2.sql pageinspect: Use new pg_lsn datatype. 2014-03-03 07:15:04 -05:00
pageinspect--1.2.sql pageinspect: Use new pg_lsn datatype. 2014-03-03 07:15:04 -05:00
pageinspect--unpackaged--1.0.sql Throw a useful error message if an extension script file is fed to psql. 2011-10-12 15:45:03 -04:00
pageinspect.control pageinspect: Use new pg_lsn datatype. 2014-03-03 07:15:04 -05:00
rawpage.c Check block number against the correct fork in get_raw_page(). 2014-07-22 11:46:29 -04:00