pgpool2.git / summary / log / commit / refs

commit    bfa849ee1d6da37ec47d301477e68556bcbf24c2
Author:   Tatsuo Ishii <ishii at sraoss.co.jp>
Date:     Mon Apr 25 22:58:04 2011 +0000

    Fix bug with start_recoery().
    It calls connect_backend() and then calls PQfinish(NULL) if
    connect_backend() returns NULL, which is apparently wrong usage of
    PQfinish(). Actually PQfinish() has been called in connect_backend()
    in this case.
    Also fix typo and enhance error message.


recovery.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recovery.c b/recovery.c index 0e0eeb224..68e97f3fa 100644 --- a/recovery.c +++ b/recovery.c @@ -71,8 +71,7 @@ int start_recovery(int recovery_node) conn = connect_backend_libpq(backend); if (conn == NULL) { - PQfinish(conn); - pool_error("start_recover: could not connect master node."); + pool_error("start_recovery: could not connect master node (%d)", node_id); return 1; } [parent: d7eeaa864116]