Re: Reducing power consumption on idle servers

From: Chapman Flack <chap(at)anastigmatix(dot)net>
To: Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Reducing power consumption on idle servers
Date: 2022-02-21 16:49:11
Message-ID: 6213C287.6000901@anastigmatix.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-02-21 16:52:28 Re: [RFC] building postgres with meson
Previous Message Andres Freund 2022-02-21 16:47:36 making pg_regress less noisy by removing boilerplate