Hi Higuchi-san,
(1)
What made you think this problem rarely occurs in PG 10 or later?  Looking at the following code, this seems to happen
inPG 10+ too.
 
    if (do_wait)
    {
        write_eventlog(EVENTLOG_INFORMATION_TYPE, _("Waiting for server startup...\n"));
        if (wait_for_postmaster(postmasterPID, true) != POSTMASTER_READY)
        {
            write_eventlog(EVENTLOG_ERROR_TYPE, _("Timed out waiting for server startup\n"));
            pgwin32_SetServiceStatus(SERVICE_STOPPED);
            return;
        }
        write_eventlog(EVENTLOG_INFORMATION_TYPE, _("Server started and accepting connections\n"));
    }
(2)
What state should we consider SERVICE_RUNNING as?  Isn't it the state where the server has completed startup processing
andaccepts connections?  If no, how is it different from SERVICE_STARTING?
 
(I know that when -w (wait) is not specified, the status becomes SERVICE_RUNNING whether or not the server completes
startupprocessing...)
 
(3)
+                write_eventlog(EVENTLOG_INFORMATION_TYPE, _("Server startup timed out but might continue in the
background\n"));
This message is new, isn't it?  I think the existing message "Time out..." is enough.
(4)
+                write_eventlog(EVENTLOG_ERROR_TYPE, _("Server startup failed. Examine the log output.\n"));
The first sentence (phenomenon) and the second line (detail or action) should be separated with a newline.  Below are
someexamples in pg_ctl.c.  Note that write_stderr() writes to the eventlog when running under a Windows service.
 
                write_stderr(_("%s: could not start server\n"
                               "Examine the log output.\n"),
            write_stderr(_("The program \"%s\" was found by \"%s\"\n"
                           "but was not the same version as %s.\n"
                           "Check your installation.\n"),
Regards
Takayuki Tsunakawa