projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f43e295
)
Fix bogus MaxAllocSize check in logtape.c.
author
Jeff Davis
<
[email protected]
>
Fri, 4 Sep 2020 19:01:58 +0000
(12:01 -0700)
committer
Jeff Davis
<
[email protected]
>
Fri, 4 Sep 2020 19:09:52 +0000
(12:09 -0700)
Reported-by: Peter Geoghegan
Discussion: https://postgr.es/m/CAH2-Wz=NZPZc3-fkdmvu=w2itx0PiB-G6QpxHXZOjuvFAzPdZw@mail.gmail.com
Backpatch-through: 13
src/backend/utils/sort/logtape.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/utils/sort/logtape.c
b/src/backend/utils/sort/logtape.c
index 788815cdab6ca9f37a8e9ef3bbdb6d72c5d88adc..bbb01f6d3373972262b6083c0c955eae33946d8b 100644
(file)
--- a/
src/backend/utils/sort/logtape.c
+++ b/
src/backend/utils/sort/logtape.c
@@
-491,7
+491,7
@@
ltsReleaseBlock(LogicalTapeSet *lts, long blocknum)
* If the freelist becomes very large, just return and leak this free
* block.
*/
- if (lts->freeBlocksLen * 2 > MaxAllocSize)
+ if (lts->freeBlocksLen * 2
* sizeof(long)
> MaxAllocSize)
return;
lts->freeBlocksLen *= 2;