Hi, > Replication never got the memo, so power consumption on an > idle server is not very effective on standby or logical subscribers. > The code and timing for hibernation is also different for each worker, > which is confusing.
Agree, this patch makes it easier to understand the hibernation behavior of various workers. > 1. Standardize the hibernation time at 60s, using a #define > HIBERNATE_DELAY_SEC 60 I notice in patch 3 HIBERNATE_DELAY_SEC has been increased to 300 seconds, what’s the reasoning behind it? Is longer hibernation delay better? If so can we set it to INT_MAX (the max timeout allowed by WaitLatch()) in which case a worker in hibernation only relies on wakeup? I think it would be nice to run experiments to verify that the patch reduces power consumption while varying the value of HIBERNATE_DELAY_SEC. Regards, Zheng Li Amazon RDS/Aurora for PostgreSQL On Thu, Mar 3, 2022 at 5:49 PM Tom Lane <t...@sss.pgh.pa.us> wrote: > > Jim Nasby <nas...@amazon.com> writes: > > I'm wondering if it'd be worth linking autovac wakeup from a truly idle > > state to the stats collector. If there's no stats messages coming in > > clearly there's nothing new for autovac. > > That seems pretty scary in the current system design, where the > stats collector is intentionally not 100% reliable (and sometimes, > less intentionally, it fails completely). If we get to a place > where we're willing to bank on stats being collected 100% of the > time, it might make sense. > > regards, tom lane > >