pgpool2.git / summary / log / commit / refs

commit    adae41b2a62ab8ed4e030baf9b84a5fe2a35be43
Author:   Yoshiyuki Asaba <y-asaba at pgfoundry.org>
Date:     Thu May 22 14:36:38 2008 +0000

    If a backend raised FATAL error while health checking, do not send a
    Terminate message. Because sending the message fails with EPIPE.


main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 7e6bc3f5a..7fe3e6782 100644 --- a/main.c +++ b/main.c @@ -1389,7 +1389,11 @@ int health_check(void) read(fd, &kind, 1); - if (write(fd, "X", 1) < 0) + /* + * If a backend raised a FATAL error(max connections error or + * startin up error?), do not send a Terminate message. + */ + if ((kind != 'E') && (write(fd, "X", 1) < 0)) { pool_error("health check failed during write. host %s at port %d is down. reason: %s. Perhaps wrong health check user?", BACKEND_INFO(i).backend_hostname, [parent: f25610a6fd67]