aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/enum.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2024-02-02 21:12:30 +0200
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2024-02-02 21:12:30 +0200
commitd212957254de85aad934e2601e5a07661db268fb (patch)
treee0ac8bce3be68521f576859668845cdfa5ce3627 /src/backend/utils/adt/enum.c
parent7e0ade0ffe0a76b1926a4af39ecdf799c96ef1ba (diff)
downloadpostgresql-d212957254de85aad934e2601e5a07661db268fb.tar.gz
postgresql-d212957254de85aad934e2601e5a07661db268fb.zip
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 full and an assertion failure, if you tried to extend a temp relation again after a failure. Alexander's test case used running out of disk space to trigger the original failure. This bug was introduced in the large ResourceOwner rewrite commit b8bff07daa. Before that, the UnpinLocalBuffer() call guaranteed that the subsequent PinLocalBuffer() will succeed, but after the rewrite, releasing an old resource doesn't guarantee that there is space for a new one. Add a comment explaining why the UnpinBuffer + PinBuffer calls in BufferAlloc(), with no ResourceOwnerEnlarge() in between, are safe. Reported-by: Alexander Lakhin Discussion: https://www.postgresql.org/message-id/dc574fea-c83e-a600-08cd-10881762e4fa@gmail.com
Diffstat (limited to 'src/backend/utils/adt/enum.c')
0 files changed, 0 insertions, 0 deletions