pgsql: Improve handling of out-of-memory in libpq.

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема pgsql: Improve handling of out-of-memory in libpq.
Дата
Msg-id E1ZCV8F-0002Q9-Ez@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Improve handling of out-of-memory in libpq.

If an allocation fails in the main message handling loop, pqParseInput3
or pqParseInput2, it should not be treated as "not enough data available
yet". Otherwise libpq will wait indefinitely for more data to arrive from
the server, and gets stuck forever.

This isn't a complete fix - getParamDescriptions and getCopyStart still
have the same issue, but it's a step in the right direction.

Michael Paquier and me. Backpatch to all supported versions.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/414bef30bfab20451e15fe799642b52166db8c34

Modified Files
--------------
src/interfaces/libpq/fe-protocol2.c |   51 ++++++++++++++++++++--------
src/interfaces/libpq/fe-protocol3.c |   63 +++++++++++++++++++++++++----------
2 files changed, 83 insertions(+), 31 deletions(-)


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Improve handling of out-of-memory in libpq.
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Oops, PQExpBufferDataBroken doesn't exist before 9.2.