public inbox for [email protected]
help / color / mirror / Atom feedProposal: emit warning if life check has not started yet
2+ messages / 1 participants
[nested] [flat]
* Proposal: emit warning if life check has not started yet
@ 2025-08-08 02:47 Tatsuo Ishii <[email protected]>
2025-08-13 11:10 ` Re: Proposal: emit warning if life check has not started yet Tatsuo Ishii <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Tatsuo Ishii @ 2025-08-08 02:47 UTC (permalink / raw)
To: [email protected]
Currently lifecheck emits a log only when life check becomes
ready. This is inconvenient for admins since they need to watch log
file until life check is ready. This commit changes life check to emit
warnings periodically until life check has started. The interval of
the warnings is wd_interval * 10 seconds. However for the first time
at lifecheck starting, no warning is emitted since it is likely that
lifecheck is not ready at that point.
Patch attached.
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
Attachments:
[application/octet-stream] v1-0001-Emit-warning-if-life-check-has-not-started-yet.patch (1.5K, 2-v1-0001-Emit-warning-if-life-check-has-not-started-yet.patch)
download | inline diff:
From 149c6ec7e55b19217d081dbf21314588ab979837 Mon Sep 17 00:00:00 2001
From: Tatsuo Ishii <[email protected]>
Date: Fri, 8 Aug 2025 11:44:26 +0900
Subject: [PATCH v1] Emit warning if life check has not started yet.
Currently lifecheck emits a log only when life check is ready. This is
inconvenient for admins since they need to watch log file anticipating
until life check is ready. This commit changes life check to emit
warnings periodically until life check has started. The interval of
the warnings is wd_interval * 10 seconds. However for the first time
at lifecheck starting, no warning is emitted since it is likely that
lifecheck is not ready at that point.
---
src/watchdog/wd_lifecheck.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/watchdog/wd_lifecheck.c b/src/watchdog/wd_lifecheck.c
index 5830d82af..0694a2228 100644
--- a/src/watchdog/wd_lifecheck.c
+++ b/src/watchdog/wd_lifecheck.c
@@ -378,6 +378,7 @@ lifecheck_main(void)
{
sigjmp_buf local_sigjmp_buf;
int i;
+ bool need_life_check_warning = false;
ereport(DEBUG1,
(errmsg("I am watchdog lifecheck child with pid:%d", getpid())));
@@ -424,6 +425,14 @@ lifecheck_main(void)
/* wait until ready to go */
while (WD_OK != is_wd_lifecheck_ready())
{
+ /*
+ * For the first time we do not emit warning since it is likely the
+ * life check is not ready.
+ */
+ if (need_life_check_warning)
+ ereport(WARNING,
+ (errmsg("watchdog: lifecheck has not started yet")));
+ need_life_check_warning = true;
sleep(pool_config->wd_interval * 10);
}
--
2.25.1
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Proposal: emit warning if life check has not started yet
2025-08-08 02:47 Proposal: emit warning if life check has not started yet Tatsuo Ishii <[email protected]>
@ 2025-08-13 11:10 ` Tatsuo Ishii <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Tatsuo Ishii @ 2025-08-13 11:10 UTC (permalink / raw)
To: [email protected]
> Currently lifecheck emits a log only when life check becomes
> ready. This is inconvenient for admins since they need to watch log
> file until life check is ready. This commit changes life check to emit
> warnings periodically until life check has started. The interval of
> the warnings is wd_interval * 10 seconds. However for the first time
> at lifecheck starting, no warning is emitted since it is likely that
> lifecheck is not ready at that point.
>
> Patch attached.
Patch pushed with slight commit message changes. Thanks.
https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=a85b848cc5e749051e3edfb892bdb366f7c23a31
--
Tatsuo Ishii
SRA OSS K.K.
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-08-13 11:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-08-08 02:47 Proposal: emit warning if life check has not started yet Tatsuo Ishii <[email protected]>
2025-08-13 11:10 ` Tatsuo Ishii <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox