You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
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.com