postgresql/src
Tom Lane 1ea941450b 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:36 -04:00
..
backend Check block number against the correct fork in get_raw_page(). 2014-07-22 11:46:36 -04:00
bin Translation updates 2014-07-21 01:07:36 -04:00
common pgindent run for 9.4 2014-05-06 12:12:18 -04:00
include Stamp 9.4beta2. 2014-07-21 15:07:50 -04:00
interfaces Translation updates 2014-07-21 01:07:36 -04:00
makefiles Flush a stray definition of $(DLLTOOL). 2014-02-11 12:59:48 -05:00
pl Translation updates 2014-07-21 01:07:36 -04:00
port Add mkdtemp() to libpgport. 2014-06-14 09:41:16 -04:00
template Revert to using --enable-auto-import in Cygwin builds. 2014-02-16 15:14:04 -05:00
test Allow empty string object keys in json_object(). 2014-07-22 11:25:40 -04:00
timezone Reject out-of-range numeric timezone specifications. 2014-07-21 22:41:23 -04:00
tools Move view reloptions into their own varlena struct 2014-07-14 17:24:40 -04:00
tutorial pgindent run for 9.4 2014-05-06 12:12:18 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in Support vpath builds in TAP tests 2014-07-02 21:48:35 -04:00
Makefile.shlib Tweak position of $(DLL_DEFFILE) in shared-library link commands. 2014-02-12 11:22:23 -05:00
nls-global.mk Setup error context callback for transaction lock waits 2014-03-19 15:10:36 -03:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00