pgsql: Ensure libpq reports a suitable error message on unexpected sock

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Ensure libpq reports a suitable error message on unexpected sock
Дата
Msg-id E1Xh4bw-0000YL-Ni@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Ensure libpq reports a suitable error message on unexpected socket EOF.

The EOF-detection logic in pqReadData was a bit confused about who should
set up the error message in case the kernel gives us read-ready-but-no-data
rather than ECONNRESET or some other explicit error condition.  Since the
whole point of this situation is that the lower-level functions don't know
there's anything wrong, pqReadData itself must set up the message.  But
keep the assumption that if an errno was reported, a message was set up at
lower levels.

Per bug #11712 from Marko Tiikkaja.  It's been like this for a very long
time, so back-patch to all supported branches.

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/6fa31d8d121df19d4625397bec607171a2afede5

Modified Files
--------------
src/interfaces/libpq/fe-misc.c |   19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Ensure libpq reports a suitable error message on unexpected sock
Следующее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Minimize calls of pg_class_aclcheck to minimum necessary