forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7430c77
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 parentb5ec22b commit7430c77
2 files changed
+11
-1
lines changedLines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
830 | 830 |
| |
831 | 831 |
| |
832 | 832 |
| |
| 833 | + | |
833 | 834 |
| |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
834 | 843 |
| |
835 | 844 |
| |
836 | 845 |
| |
|
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)