diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2021-09-09 11:45:48 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2021-09-09 11:45:48 -0400 |
commit | a7a73ce301715a713954278ae1de36aaf39221ab (patch) | |
tree | 32bc7d9750cd2e923afa2ee84f3956f28f82ae7c /src/tutorial/funcs.source | |
parent | 4665352543d73a182a8fe638065430ef7db8b2b9 (diff) | |
download | postgresql-a7a73ce301715a713954278ae1de36aaf39221ab.tar.gz postgresql-a7a73ce301715a713954278ae1de36aaf39221ab.zip |
Check for relation length overrun soon enough.
We don't allow relations to exceed 2^32-1 blocks, because block
numbers are 32 bits and the last possible block number is reserved
to mean InvalidBlockNumber. There is a check for this in mdextend,
but that's really way too late, because the smgr API requires us to
create a buffer for the block-to-be-added, and we do not want to
have any buffer with blocknum InvalidBlockNumber. (Such a case
can trigger assertions in bufmgr.c, plus I think it might confuse
ReadBuffer's logic for data-past-EOF later on.) So put the check
into ReadBuffer.
Per report from Christoph Berg. It's been like this forever,
so back-patch to all supported branches.
Discussion: https://postgr.es/m/YTn1iTkUYBZfcODk@msg.credativ.de
Diffstat (limited to 'src/tutorial/funcs.source')
0 files changed, 0 insertions, 0 deletions