diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2016-10-06 09:46:40 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2016-10-06 09:46:40 +0300 |
commit | b56fb691b0033f9b86e0552bd5adfd485f05eef6 (patch) | |
tree | 06818b313e3c114faebaaf60697982b8894c1e36 /src/backend/port/dynloader/netbsd.c | |
parent | bfe2e847811a4d0a46c8cdf16195c0e5929b6f83 (diff) | |
download | postgresql-b56fb691b0033f9b86e0552bd5adfd485f05eef6.tar.gz postgresql-b56fb691b0033f9b86e0552bd5adfd485f05eef6.zip |
Fix excessive memory consumption in the new sort pre-reading code.
LogicalTapeRewind() should not allocate large read buffer, if the tape
is completely empty. The calling code relies on that, for its
calculation of how much memory to allocate for the read buffers. That
lead to massive overallocation of memory, if maxTapes was high, but
only a few tapes were actually used.
Reported by Tomas Vondra
Discussion: <7303da46-daf7-9c68-3cc1-9f83235cf37e@2ndquadrant.com>
Diffstat (limited to 'src/backend/port/dynloader/netbsd.c')
0 files changed, 0 insertions, 0 deletions