Re: Fix handling of invalid sockets returned by PQsocket()

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Fix handling of invalid sockets returned by PQsocket()
Дата
Msg-id 20160217165804.GA873990@alvherre.pgsql
обсуждение исходный текст
Ответ на Fix handling of invalid sockets returned by PQsocket()  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: Fix handling of invalid sockets returned by PQsocket()  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
Michael Paquier wrote:
> Hi all,
> 
> After looking at Alvaro's message mentioning the handling of
> PQsocket() for invalid sockets, I just had a look by curiosity at
> other calls of this routine, and found a couple of issues:
> 1) In vacuumdb.c, init_slot() does not check for the return value of PQsocket():
> slot->sock = PQsocket(conn);
> 2) In isolationtester.c, try_complete_step() should do the same.
> 3) In pg_recvlogical.c for StreamLogicalLog() I am spotting the same problem.
> I guess those ones should be fixed as well, no?

I patched pgbench to use PQerrorMessage rather than strerror(errno).  I
think your patch should do the same.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Martin Liška
Дата:
Сообщение: Re: [PATCH] Code refactoring related to -fsanitize=use-after-scope
Следующее
От: Joe Conway
Дата:
Сообщение: Re: exposing pg_controldata and pg_config as functions