[pgpool-hackers: 2262] Why we need pool_read_with_error?
Yugo Nagata
nagata at sraoss.co.jp
Wed Apr 19 14:19:18 JST 2017
Hi,
When I read the pgpool code, I found that pool_read_with_error()
is very meaningless.
This is a simple wrapper of pool_read() and defined as following
135 void pool_read_with_error(POOL_CONNECTION *cp, void *buf, int len,
136 const char* err_context )
137 {
138 if (pool_read(cp, buf, len) < 0)
139 {
140 ereport(ERROR,
141 (errmsg("failed to read data of length %d from DB node: %d",len,cp->db_node_id),
142 errdetail("error occurred when reading: %s",err_context?err_context:"")));
143 }
144 }
However, pool_read() always returns 0 and emitts any errors by itself,
so pool_read_with_error() is not necessary. We can get rid of this.
--
Yugo Nagata <nagata at sraoss.co.jp>
More information about the pgpool-hackers
mailing list