Consider local heartbeat interfaces in watchdog config checks.
authorBo Peng <pengbo@sraoss.co.jp>
Mon, 1 Sep 2025 02:30:35 +0000 (11:30 +0900)
committerBo Peng <pengbo@sraoss.co.jp>
Mon, 1 Sep 2025 02:30:35 +0000 (11:30 +0900)
This is a follow-up to commit 94b62a9.

src/watchdog/watchdog.c

index ffd1cef506787c1a75dafa03fb6b1bfb57cad24e..6f6d2d2cd56875fd9691fe0b87f06373d3e15b5f 100644 (file)
@@ -658,7 +658,7 @@ wd_check_config(void)
                                                MAX_PASSWORD_SIZE)));
        if (pool_config->wd_lifecheck_method == LIFECHECK_BY_HB)
        {
-               if (pool_config->num_hb_dest_if <= 0)
+               if (pool_config->num_hb_local_if <= 0 || pool_config->num_hb_dest_if <= 0)
                        ereport(ERROR,
                                        (errmsg("invalid life-check configuration. no heartbeat interfaces defined")));
        }