Re: when the startup process doesn't (logging startup delays)
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>,
Nitin Jadhav <nitinjadhavpostgres@gmail.com>,
Justin Pryzby <pryzby@telsasoft.com>,
Michael Paquier <michael@paquier.xyz>,
Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>,
Andres Freund <andres@anarazel.de>,
Stephen Frost <sfrost@snowman.net>,
Magnus Hagander <magnus@hagander.net>,
Thomas Munro <thomas.munro@gmail.com>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2021-09-30T19:10:25Z
Lists: pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes: > ... When I say I want my handler to be > fired in 3 s, I don't mean that I want it to be fired when the system > time is 3 seconds greater than it is right now. I mean I want it to be > fired in 3 actual seconds, regardless of what dumb thing the system > clock may choose to do. That would be lovely, certainly. But aren't you moving the goalposts rather far? I don't think we make any promises about such things today, so why has the issue suddenly gotten more pressing? In particular, why do you think Nitin's patch is proof against this? Seems to me it's probably got *more* failure cases, not fewer, if the system clock is acting funny. BTW, one could imagine addressing this concern by having timeout.c work with CLOCK_MONOTONIC instead of the regular wall clock. But I fear we'd have to drop enable_timeout_at(), for lack of ability to translate between CLOCK_MONOTONIC timestamps and those used by anybody else. Also get_timeout_start_time/get_timeout_finish_time would become problematic. Maybe we only really care about deltas, so the more restrictive API would be workable, but it seems like a nontrivial amount of work. On the whole, in these days of NTP, I'm not sure I care to spend large amounts of effort on dealing with a bogus system clock. regards, tom lane
Commits
-
Un-revert "Disable STARTUP_PROGRESS_TIMEOUT in standby mode."
- ecb01e6ebb5a 15.3 landed
-
Revert "Disable STARTUP_PROGRESS_TIMEOUT in standby mode."
- 1eadfbdd7eb0 15.2 landed
-
Disable STARTUP_PROGRESS_TIMEOUT in standby mode.
- 98e7234242a6 15.2 landed
- 8a2f783cc489 16.0 landed
-
Fix race condition in startup progress reporting.
- 5ccceb2946d4 15.0 landed
-
Report progress of startup operations that take a long time.
- 9ce346eabf35 15.0 landed
-
Add enable_timeout_every() to fire the same timeout repeatedly.
- 732e6677a667 15.0 landed