forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitdf3640e

Amit Kapila
Fix reorder buffer memory accounting for toast changes.
While processing toast changes in logical decoding, we rejigger thetuple change to point to in-memory toast tuples instead to on-disk toasttuples. And, to make sure the memory accounting is correct, we weresubtracting the old change size and then after re-computing the new tuple,re-adding its size at the end. Now, if there is any error before we addthe new size, we will release the changes and that will update theaccounting info (subtracting the size from the counters). And we wereunderflowing there which leads to an assertion failure in assert enabledbuilds and wrong memory accounting in reorder buffer otherwise.Author: Bertrand DrouvotReviewed-by: Amit KapilaBackpatch-through: 13, where memory accounting was introducedDiscussion:https://postgr.es/m/92b0ee65-b8bd-e42d-c082-4f3f4bf12d34@amazon.com1 parentfa703b3 commitdf3640e
1 file changed
+23
-13
lines changedLines changed: 23 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
290 | 290 |
| |
291 | 291 |
| |
292 | 292 |
| |
293 |
| - | |
| 293 | + | |
| 294 | + | |
294 | 295 |
| |
295 | 296 |
| |
296 | 297 |
| |
| |||
474 | 475 |
| |
475 | 476 |
| |
476 | 477 |
| |
477 |
| - | |
| 478 | + | |
| 479 | + | |
478 | 480 |
| |
479 | 481 |
| |
480 | 482 |
| |
| |||
792 | 794 |
| |
793 | 795 |
| |
794 | 796 |
| |
795 |
| - | |
| 797 | + | |
| 798 | + | |
796 | 799 |
| |
797 | 800 |
| |
798 | 801 |
| |
| |||
3100 | 3103 |
| |
3101 | 3104 |
| |
3102 | 3105 |
| |
3103 |
| - | |
| 3106 | + | |
3104 | 3107 |
| |
3105 |
| - | |
3106 | 3108 |
| |
3107 | 3109 |
| |
3108 | 3110 |
| |
| |||
3127 | 3129 |
| |
3128 | 3130 |
| |
3129 | 3131 |
| |
3130 |
| - | |
3131 |
| - | |
3132 | 3132 |
| |
3133 | 3133 |
| |
3134 | 3134 |
| |
| |||
4359 | 4359 |
| |
4360 | 4360 |
| |
4361 | 4361 |
| |
4362 |
| - | |
| 4362 | + | |
| 4363 | + | |
4363 | 4364 |
| |
4364 | 4365 |
| |
4365 | 4366 |
| |
| |||
4605 | 4606 |
| |
4606 | 4607 |
| |
4607 | 4608 |
| |
| 4609 | + | |
4608 | 4610 |
| |
4609 | 4611 |
| |
4610 | 4612 |
| |
4611 | 4613 |
| |
4612 | 4614 |
| |
4613 | 4615 |
| |
4614 |
| - | |
4615 |
| - | |
4616 |
| - | |
| 4616 | + | |
| 4617 | + | |
| 4618 | + | |
| 4619 | + | |
| 4620 | + | |
| 4621 | + | |
| 4622 | + | |
| 4623 | + | |
4617 | 4624 |
| |
4618 |
| - | |
| 4625 | + | |
4619 | 4626 |
| |
4620 | 4627 |
| |
4621 | 4628 |
| |
| |||
4766 | 4773 |
| |
4767 | 4774 |
| |
4768 | 4775 |
| |
| 4776 | + | |
| 4777 | + | |
4769 | 4778 |
| |
4770 |
| - | |
| 4779 | + | |
| 4780 | + | |
4771 | 4781 |
| |
4772 | 4782 |
| |
4773 | 4783 |
| |
|
0 commit comments
Comments
(0)