projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7285748
)
Fix bogus MaxAllocSize check in logtape.c.
author
Jeff Davis
Fri, 4 Sep 2020 19:01:58 +0000
(12:01 -0700)
committer
Jeff Davis
Fri, 4 Sep 2020 19:11:22 +0000
(12:11 -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 5517e59c50fd8e38ba72c8d416e65373c6e1b3bd..cdd8a836deab33bab6e7d5a9bb057e09698e91d1 100644
(file)
--- a/
src/backend/utils/sort/logtape.c
+++ b/
src/backend/utils/sort/logtape.c
@@
-489,7
+489,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;