pgsql: Fix out-of-memory error handling in ParameterDescription message

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема pgsql: Fix out-of-memory error handling in ParameterDescription message
Дата
Msg-id E1a8WQ7-0001VD-RJ@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix out-of-memory error handling in ParameterDescription message processing.

If libpq ran out of memory while constructing the result set, it would hang,
waiting for more data from the server, which might never arrive. To fix,
distinguish between out-of-memory error and not-enough-data cases, and give
a proper error message back to the client on OOM.

There are still similar issues in handling COPY start messages, but let's
handle that as a separate patch.

Michael Paquier, Amit Kapila and me. Backpatch to all supported versions.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/7b96bf445a42b1cb2a435854f9825c38253f79a2

Modified Files
--------------
src/interfaces/libpq/fe-protocol3.c |   64 +++++++++++++++++++++++++++++------
1 file changed, 53 insertions(+), 11 deletions(-)


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

Предыдущее
От: Andres Freund
Дата:
Сообщение: pgsql: Fix bug in SetOffsetVacuumLimit() triggered by find_multixact_st
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Fix out-of-memory error handling in ParameterDescription message