Re: Reducing power consumption on idle servers
Simon Riggs <simon.riggs@enterprisedb.com>
From: Simon Riggs <simon.riggs@enterprisedb.com>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>,
Kyotaro Horiguchi <horikyota.ntt@gmail.com>, Andres Freund <andres@anarazel.de>, Zheng Li <zhengli10@gmail.com>,
Jim Nasby <nasbyj@amazon.com>, Tom Lane <tgl@sss.pgh.pa.us>,
PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2022-11-16T09:03:58Z
Lists: pgsql-hackers
Attachments
- hibernate_startup.v6.patch (application/octet-stream) patch v6
On Sun, 13 Nov 2022 at 23:07, Simon Riggs <simon.riggs@enterprisedb.com> wrote:
>
> On Sun, 13 Nov 2022 at 21:28, Thomas Munro <thomas.munro@gmail.com> wrote:
> >
> > On Mon, Nov 14, 2022 at 5:52 AM Simon Riggs
> > <simon.riggs@enterprisedb.com> wrote:
> > > The attached patch is a reduced version of the original. It covers only:
> > > * deprecation of the promote_trigger_file - there are no tests that
> > > use that, hence why there is no test coverage for the patch
> > > * changing the sleep time of the startup process to 60s
> > > * docs and comments
> >
> > LPGTM. If we also fix the bogus SIGALRM wakeups[1], then finally a
> > completely idle recovery process looks like:
> >
> > kevent(8,0x0,0,{ },1,{ 60.000000000 }) = 0 (0x0)
> > kevent(8,0x0,0,{ },1,{ 60.000000000 }) = 0 (0x0)
> > kevent(8,0x0,0,{ },1,{ 60.000000000 }) = 0 (0x0)
> >
> > Presumably it would have no timeout at all in the next release.
> >
> > [1] https://www.postgresql.org/message-id/CALj2ACUiYn+ZmPGUVmGeoY1u7ino2qsvqrnufk8sWPvK3A8yJA@mail.gmail.com
>
> Clearly, I haven't been watching Hackers! Thanks for the nudge.
>
> See if this does the trick?
Looks like the SIGALRM wakeups will be silenced on the other thread,
so we can just revert back to using v6 of this patch.
Reposting v6 now so that patch tester doesn't think this has failed
when the patch on other thread gets applied.
--
Simon Riggs http://www.EnterpriseDB.com/
Commits
-
Remove promote_trigger_file.
- cd4329d9393f 16.0 landed
-
Add pg_promote function
- 10074651e335 12.0 cited
-
pg_ctl promote
- 4695da5ae97b 9.1.0 cited