Re: Reducing power consumption on idle servers - Mailing list pgsql-hackers

From Chapman Flack
Subject Re: Reducing power consumption on idle servers
Date
Msg-id 6213C287.6000901@anastigmatix.net
Whole thread Raw
In response to Re: Reducing power consumption on idle servers  (Simon Riggs <simon.riggs@enterprisedb.com>)
Responses Re: Reducing power consumption on idle servers  (Simon Riggs <simon.riggs@enterprisedb.com>)
List pgsql-hackers
Hi,

On 02/21/22 11:11, Simon Riggs wrote:
> This patch seeks to change the situation for the better in PG15, i.e.
> soon, so the changes proposed are deliberately light. It also seeks to
> provide a framework that writers of background worker processes can
> follow, since we can't just fix core, we need to fix all the various
> bgworkers in use as well.

I think there might be a typo in the worker_spi.c example:

+    /*
+     * Use the standard design pattern for wait time/hibernation.
+     * After 50 consecutive loops with work_done=true the wait time
+     * will be set to the standard hibernation timeout of 60s.
+     */
+    SET_DELAY_OR_HIBERNATE(work_done, worker_spi_naptime * 1000L);


Shouldn't the comment be "with work_done=false" ?

Regards,
-Chap



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: making pg_regress less noisy by removing boilerplate
Next
From: Fujii Masao
Date:
Subject: Re: Add checkpoint and redo LSN to LogCheckpointEnd log message