aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/variable.c
diff options
context:
space:
mode:
authorMasahiko Sawada <msawada@postgresql.org>2024-08-26 11:00:07 -0700
committerMasahiko Sawada <msawada@postgresql.org>2024-08-26 11:00:07 -0700
commit52f1d6730bf7132a175b9b612029812859218927 (patch)
tree3ef89e2797e6397b5815bd5b4b9f39c86985f407 /src/backend/commands/variable.c
parent09a8407dbfd848301cd2c9801c3b4d75adc6cabc (diff)
downloadpostgresql-52f1d6730bf7132a175b9b612029812859218927.tar.gz
postgresql-52f1d6730bf7132a175b9b612029812859218927.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/backend/commands/variable.c')
0 files changed, 0 insertions, 0 deletions