Re: when the startup process doesn't (logging startup delays)
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
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-29T20:59:09Z
Lists: pgsql-hackers
On Wed, Sep 29, 2021 at 2:06 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > The real comment I'd have here, though, is that writing one-off > code for this purpose is bad. If we have a need for a repetitive > timeout, it'd be better to add the feature to timeout.c explicitly. > That would probably also remove the need for extra copies of the > timeout time. I'm not sure that really helps very much, honestly. I mean it would be useful in this particular case, but there are other cases where we have logic like this already, and this wouldn't do anything about those. For example, consider autoprewarm_main(). Like this code, that code thinks (perhaps just because I'm the one who reviewed it) that the next time should be measured from the last time ... but an enhancement to the timeout machinery wouldn't help it at all. I suspect there are other cases like this elsewhere, because this is what I personally tend to think is the right behavior and I feel like it comes up in patch reviews from time to time, but I'm not finding any at the moment. Even if I'm right that they exist, I'm not sure they look much like each other or can easily reuse any code. And then again on the other hand, BackgroundWriterMain() thinks that the next time should be measured from the time we got around to doing it, not the scheduled time. I guess we don't really have any consistent practice here. -- Robert Haas EDB: http://www.enterprisedb.com
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