Fix pool_search_relcache() to use MASTER or MASTER_NODE_ID macro, rather than REAL_MASTER_NODE_ID.  In case node 0 fail back in streaming replication mode, pgpool does not restart child process.  So REAL_MASTER_NODE_ID looks for node 0 con info, which is not present until new connection to backend made. Thus referring to node con info results in segfault. MASTER or MASTER_NODE_ID are safe in this situation because they look at cached former master node id.
Fix pool_search_relcache() to use MASTER or MASTER_NODE_ID macro,
rather than REAL_MASTER_NODE_ID.  In case node 0 fail back in
streaming replication mode, pgpool does not restart child process.  So
REAL_MASTER_NODE_ID looks for node 0 con info, which is not present
until new connection to backend made. Thus referring to node con info
results in segfault. MASTER or MASTER_NODE_ID are safe in this
situation because they look at cached former master node id.

treasure-data/prestogres,treasure-data/prestogres,treasure-data/prestogres,treasure-data/prestogres,treasure-data/prestogres,treasure-data/prestogres,treasure-data/prestogres