pgsql: Fix excessive memory consumption in the new sort pre-reading cod

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема pgsql: Fix excessive memory consumption in the new sort pre-reading cod
Дата
Msg-id E1bs2XG-0007oQ-7N@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/b56fb691b0033f9b86e0552bd5adfd485f05eef6

Modified Files
--------------
src/backend/utils/sort/logtape.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: pgsql: Change the way pre-reading in external sort's merge phase works.
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Disable synchronous commits in pg_rewind.