pgsql: Guard against possible memory allocation botch in batchmemtuples

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Guard against possible memory allocation botch in batchmemtuples
Дата
Msg-id E1bhMOQ-0000Wp-GG@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Guard against possible memory allocation botch in batchmemtuples().

Negative availMemLessRefund would be problematic.  It's not entirely
clear whether the case can be hit in the code as it stands, but this
seems like good future-proofing in any case.  While we're at it,
insist that the value be not merely positive but not tiny, so as to
avoid doing a lot of repalloc work for little gain.

Peter Geoghegan

Discussion: <CAM3SWZRVkuUB68DbAkgw=532gW0f+fofKueAMsY7hVYi68MuYQ@mail.gmail.com>

Branch
------
master

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

Modified Files
--------------
src/backend/utils/sort/tuplesort.c | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Teach appendShellString() to not quote strings containing "-".
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Guard against possible memory allocation botch in batchmemtuples