aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorMasahiko Sawada <msawada@postgresql.org>2024-08-26 11:00:04 -0700
committerMasahiko Sawada <msawada@postgresql.org>2024-08-26 11:00:04 -0700
commitdbed2e36625de9d4074243f60f48e04b5ed67810 (patch)
treea735130d50c7eb86d06a546ae0dcdb34170ddd2f /src/common
parent6749d4aabe74ca37ce351f2e318fe1b3bcf2b71c (diff)
downloadpostgresql-dbed2e36625de9d4074243f60f48e04b5ed67810.tar.gz
postgresql-dbed2e36625de9d4074243f60f48e04b5ed67810.zip
Fix memory counter update in ReorderBuffer.
Commit 5bec1d6bc5e changed the memory usage updates of the ReorderBufferTXN to zero all at once by subtracting txn->size, rather than updating it for each change. However, if TOAST reconstruction data remained in the transaction when freeing it, there were cases where it further subtracted the memory counter from zero, resulting in an assertion failure. This change calculates the memory size for each change and updates the memory usage to precisely the amount that has been freed. Backpatch to v17, where this was introducd. Reviewed-by: Amit Kapila, Shlok Kyal Discussion: https://postgr.es/m/CAD21AoAqkNUvicgKPT_dXzNoOwpPkVTg0QPPxEcWmzT0moCJ1g%40mail.gmail.com Backpatch-through: 17
Diffstat (limited to 'src/common')
0 files changed, 0 insertions, 0 deletions