forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit8481f99
committed
Check for relation length overrun soon enough.
We don't allow relations to exceed 2^32-1 blocks, because blocknumbers are 32 bits and the last possible block number is reservedto mean InvalidBlockNumber. There is a check for this in mdextend,but that's really way too late, because the smgr API requires us tocreate a buffer for the block-to-be-added, and we do not want tohave any buffer with blocknum InvalidBlockNumber. (Such a casecan trigger assertions in bufmgr.c, plus I think it might confuseReadBuffer's logic for data-past-EOF later on.) So put the checkinto 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.de1 parent596ba75 commit8481f99
2 files changed
+11
-1
lines changedLines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
824 | 824 |
| |
825 | 825 |
| |
826 | 826 |
| |
| 827 | + | |
827 | 828 |
| |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
828 | 837 |
| |
829 | 838 |
| |
830 | 839 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
426 | 426 |
| |
427 | 427 |
| |
428 | 428 |
| |
429 |
| - | |
| 429 | + | |
| 430 | + | |
430 | 431 |
| |
431 | 432 |
| |
432 | 433 |
| |
|
0 commit comments
Comments
(0)