forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd212957
committed
Fix bug in bulk extending temp relation after failure
A ResourceOwnerEnlarge() call was missing. That led to an error:ERROR: ResourceOwnerRemember called but array was fulland an assertion failure, if you tried to extend a temp relation againafter a failure. Alexander's test case used running out of disk spaceto trigger the original failure.This bug was introduced in the large ResourceOwner rewrite commitb8bff07. Before that, the UnpinLocalBuffer() call guaranteed thatthe subsequent PinLocalBuffer() will succeed, but after the rewrite,releasing an old resource doesn't guarantee that there is space for anew one.Add a comment explaining why the UnpinBuffer + PinBuffer calls inBufferAlloc(), with no ResourceOwnerEnlarge() in between, are safe.Reported-by: Alexander LakhinDiscussion:https://www.postgresql.org/message-id/dc574fea-c83e-a600-08cd-10881762e4fa@gmail.com1 parent7e0ade0 commitd212957
File tree
2 files changed
+11
-1
lines changed- src/backend
- storage/buffer
- utils/resowner
2 files changed
+11
-1
lines changedLines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
374 | 374 |
| |
375 | 375 |
| |
376 | 376 |
| |
| 377 | + | |
| 378 | + | |
| 379 | + | |
377 | 380 |
| |
378 | 381 |
| |
379 | 382 |
| |
| |||
646 | 649 |
| |
647 | 650 |
| |
648 | 651 |
| |
| 652 | + | |
| 653 | + | |
649 | 654 |
| |
650 | 655 |
| |
651 | 656 |
| |
|
Lines changed: 6 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
548 | 548 |
| |
549 | 549 |
| |
550 | 550 |
| |
551 |
| - | |
| 551 | + | |
552 | 552 |
| |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
553 | 558 |
| |
554 | 559 |
| |
555 | 560 |
| |
|
0 commit comments
Comments
(0)