Re: when the startup process doesn't (logging startup delays)
От
Justin Pryzby
Тема
Re: when the startup process doesn't (logging startup delays)
Дата
Msg-id
20210725175654.GA23997@telsasoft.com
Ответ на
Список
Дерево обсуждения
when the startup process doesn't Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: when the startup process doesn't Bruce Momjian <bruce@momjian.us>
Re: when the startup process doesn't Andres Freund <andres@anarazel.de>
Re: when the startup process doesn't Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: when the startup process doesn't Thomas Munro <thomas.munro@gmail.com>
Re: when the startup process doesn't Tom Lane <tgl@sss.pgh.pa.us>
Re: when the startup process doesn't Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't Magnus Hagander <magnus@hagander.net>
Re: when the startup process doesn't Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
Re: when the startup process doesn't Magnus Hagander <magnus@hagander.net>
Re: when the startup process doesn't Tom Lane <tgl@sss.pgh.pa.us>
Re: when the startup process doesn't Stephen Frost <sfrost@snowman.net>
Re: when the startup process doesn't Tom Lane <tgl@sss.pgh.pa.us>
Re: when the startup process doesn't Stephen Frost <sfrost@snowman.net>
Re: when the startup process doesn't Andres Freund <andres@anarazel.de>
Re: when the startup process doesn't Stephen Frost <sfrost@snowman.net>
Re: when the startup process doesn't Andres Freund <andres@anarazel.de>
Re: when the startup process doesn't Stephen Frost <sfrost@snowman.net>
Re: when the startup process doesn't Andres Freund <andres@anarazel.de>
Re: when the startup process doesn't Stephen Frost <sfrost@snowman.net>
Re: when the startup process doesn't Andres Freund <andres@anarazel.de>
Re: when the startup process doesn't Tom Lane <tgl@sss.pgh.pa.us>
Re: when the startup process doesn't Andres Freund <andres@anarazel.de>
Re: when the startup process doesn't Stephen Frost <sfrost@snowman.net>
Re: when the startup process doesn't Jehan-Guillaume de Rorthais <jgdr@dalibo.com>
Re: when the startup process doesn't Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: when the startup process doesn't Justin Pryzby <pryzby@telsasoft.com>
Re: when the startup process doesn't Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't Tom Lane <tgl@sss.pgh.pa.us>
Re: when the startup process doesn't Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: when the startup process doesn't Justin Pryzby <pryzby@telsasoft.com>
Re: when the startup process doesn't Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: when the startup process doesn't Justin Pryzby <pryzby@telsasoft.com>
Re: when the startup process doesn't Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Justin Pryzby <pryzby@telsasoft.com>
Re: when the startup process doesn't (logging startup delays) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Amul Sul <sulamul@gmail.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Justin Pryzby <pryzby@telsasoft.com>
Re: when the startup process doesn't (logging startup delays) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Justin Pryzby <pryzby@telsasoft.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Justin Pryzby <pryzby@telsasoft.com>
Re: when the startup process doesn't (logging startup delays) Justin Pryzby <pryzby@telsasoft.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Justin Pryzby <pryzby@telsasoft.com>
Re: when the startup process doesn't (logging startup delays) Michael Paquier <michael@paquier.xyz>
Re: when the startup process doesn't (logging startup delays) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Justin Pryzby <pryzby@telsasoft.com>
Re: when the startup process doesn't (logging startup delays) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Justin Pryzby <pryzby@telsasoft.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: when the startup process doesn't (logging startup delays) Justin Pryzby <pryzby@telsasoft.com>
Re: when the startup process doesn't (logging startup delays) Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: when the startup process doesn't (logging startup delays) Tom Lane <tgl@sss.pgh.pa.us>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Tom Lane <tgl@sss.pgh.pa.us>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Tom Lane <tgl@sss.pgh.pa.us>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Thomas Munro <thomas.munro@gmail.com>
Re: when the startup process doesn't (logging startup delays) Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Simon Riggs <simon.riggs@enterprisedb.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Thomas Munro <thomas.munro@gmail.com>
Re: when the startup process doesn't (logging startup delays) Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Tom Lane <tgl@sss.pgh.pa.us>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Tom Lane <tgl@sss.pgh.pa.us>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Tom Lane <tgl@sss.pgh.pa.us>
Re: when the startup process doesn't (logging startup delays) Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Simon Riggs <simon.riggs@enterprisedb.com>
Re: when the startup process doesn't (logging startup delays) Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Simon Riggs <simon.riggs@enterprisedb.com>
Re: when the startup process doesn't (logging startup delays) Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Michael Paquier <michael@paquier.xyz>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Amul Sul <sulamul@gmail.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Justin Pryzby <pryzby@telsasoft.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Re: when the startup process doesn't (logging startup delays) Robert Haas <robertmhaas@gmail.com>
Re: when the startup process doesn't (logging startup delays) Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Re: when the startup process doesn't Tom Lane <tgl@sss.pgh.pa.us>
Re: when the startup process doesn't Magnus Hagander <magnus@hagander.net>
Re: when the startup process doesn't SATYANARAYANA NARLAPURAM <satyanarlapuram@gmail.com>
On Fri, Jul 23, 2021 at 04:09:47PM +0530, Nitin Jadhav wrote:
> > I think walkdir() should only call LogStartupProgress(FSYNC_IN_PROGRESS, path);
> > when action == datadir_fsync_fname.
>
> I agree and fixed it.
I saw that you fixed it by calling InitStartupProgress() after the walkdir()
calls which do pre_sync_fname. So then walkdir is calling
LogStartupProgress(STARTUP_PROCESS_OP_FSYNC) even when it's not doing fsync,
and then LogStartupProgress() is returning because !AmStartupProcess().
That seems indirect, fragile, and confusing. I suggest that walkdir() should
take an argument for which operation to pass to LogStartupProgress(). You can
pass a special enum for cases where nothing should be logged, like
STARTUP_PROCESS_OP_NONE.
On Wed, Jul 21, 2021 at 04:47:32PM +0530, Bharath Rupireddy wrote:
> 1) I still don't see the need for two functions LogStartupProgress and
> LogStartupProgressComplete. Most of the code is duplicate. I think we
> can just do it with a single function something like [1]:
I agree that one function can do this more succinctly. I think it's best to
use a separate enum value for START operations and END operations.
switch(operation)
{
case STARTUP_PROCESS_OP_SYNCFS_START:
ereport(...);
break;
case STARTUP_PROCESS_OP_SYNCFS_END:
ereport(...);
break;
case STARTUP_PROCESS_OP_FSYNC_START:
ereport(...);
break;
case STARTUP_PROCESS_OP_FSYNC_END:
ereport(...);
break;
...
--
Justin
В списке pgsql-hackers по дате отправления
От: Ranier Vilela
Дата: