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