pgpool2.git / summary / log / commit / refs

commit    4b4ad5d7ff7804f4913ded4fdecf41616497e288
Author:   Tatsuo Ishii <ishii at sraoss.co.jp>
Date:     Tue Nov 03 01:51:46 2009 +0000

    Fix pool_flush_it() so that it does not complain when failed to flush
    to frontend. Also add info to the message if it was backend or
    frontend to avoid confusion.


pool_stream.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pool_stream.c b/pool_stream.c index ca22a0363..5e1c4691d 100644 --- a/pool_stream.c +++ b/pool_stream.c @@ -438,8 +438,16 @@ int pool_flush_it(POOL_CONNECTION *cp) else { - pool_error("pool_flush_it: write failed (%s) offset: %d wlen: %d", - strerror(errno), offset, wlen); + /* If this is the backend stream, report error. Otherwise + * just report debug message. + */ + if (cp->isbackend) + pool_error("pool_flush_it: write failed to backend (%s) offset: %d wlen: %d", + strerror(errno), offset, wlen); + else + pool_debug("pool_flush_it: write failed to frontend (%s) offset: %d wlen: %d", + strerror(errno), offset, wlen); + cp->wbufpo = 0; return -1; } [parent: c743f99bb5d2]