From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Fix handling of invalid sockets returned by PQsocket() |
Date: | 2016-02-17 05:27:10 |
Message-ID: | CAB7nPqRo22qwYVegew3MX8nF-NHUnQywU_fZi7Vkp2HV91eXCw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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?
The patch attached addresses those issues.
This has been raised in this message, but beginning a new thread makes
more sense:
http://www.postgresql.org/message-id/CAB7nPqTTZoiuVYGNonLVnZysStUSOfhKeO9FTrQbKWJ36UCdOA@mail.gmail.com
Regards,
--
Michael
Attachment | Content-Type | Size |
---|---|---|
pqsocket-error-fix.patch | text/x-patch | 2.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Regina Obe | 2016-02-17 05:34:25 | On Conflict Do nothing errors IF conflict and there is a data type length or check failure |
Previous Message | Oleg Bartunov | 2016-02-17 05:26:16 | Re: Figures in docs |