Avoid protocol breakage when pooler fails to open connection to one or more
authorPavan Deolasee <[email protected]>
Mon, 9 May 2016 05:11:49 +0000 (10:41 +0530)
committerPavan Deolasee <[email protected]>
Mon, 9 May 2016 05:14:02 +0000 (10:44 +0530)
nodes.

While the pooler sends both fds as well pids, the client was bailing out early
if it can't find required number of fds, thus causing protocol breakdown

Per report by Zhang Eamon

src/backend/pgxc/pool/poolmgr.c

index c73e1982ec962939deb5ce2af0b66b52e51b2e28..11c2774e5922df7b60768d4ea728f9ce53b50a9b 100644 (file)
@@ -960,7 +960,7 @@ PoolManagerGetConnections(List *datanodelist, List *coordlist, int **pids)
        if (pool_recvfds(&poolHandle->port, fds, totlen))
        {
                pfree(fds);
-               return NULL;
+               fds = NULL;
        }
 
        if (pool_recvpids(&poolHandle->port, pids) != totlen)