forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit27cef0a
committed
Check block number against the correct fork in get_raw_page().
get_raw_page tried to validate the supplied block number againstRelationGetNumberOfBlocks(), which of course is only right whenaccessing the main fork. In most cases, the main fork is longerthan the others, so that the check was too weak (allowing alower-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 sloppilymaintained comment for RelationGetNumberOfBlocksInFork.This has been wrong since we invented relation forks, so back-patchto all supported branches.1 parent4ebe351 commit27cef0a
2 files changed
+7
-5
lines changedLines changed: 5 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
131 | 131 |
| |
132 | 132 |
| |
133 | 133 |
| |
134 |
| - | |
135 |
| - | |
136 |
| - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
137 | 139 |
| |
138 | 140 |
| |
139 | 141 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2022 | 2022 |
| |
2023 | 2023 |
| |
2024 | 2024 |
| |
2025 |
| - | |
2026 |
| - | |
| 2025 | + | |
| 2026 | + | |
2027 | 2027 |
| |
2028 | 2028 |
| |
2029 | 2029 |
| |
|
0 commit comments
Comments
(0)