pgpool2.git / summary / log / commit / refs

commit    dbfa5e95bb2a60f5604857b7a3575d87bc270b7c
Author:   Tatsuo Ishii <ishii@postgresql.org>
Date:     Wed Dec 05 10:21:13 2012 +0000

    Fix health_check() to check the health check timer before retrying
    with template1 database. Without this, the retry with node 0 always
    fails because health check timer may be already expired.


main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index 5729f62bb..ac3ac16b2 100644 --- a/main.c +++ b/main.c @@ -2136,11 +2136,11 @@ static int health_check(void) if (!slot) { - if (!strcmp(dbname, "postgres")) + /* + * Retry with template1 unless health check timer is expired. + */ + if (!strcmp(dbname, "postgres") && health_check_timer_expired == 0) { - /* - * Retry with template1 - */ dbname = "template1"; goto Retry; } [parent: eb310fca19fb]