From: | "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com> |
---|---|
To: | "Higuchi, Daisuke" <higuchi(dot)daisuke(at)jp(dot)fujitsu(dot)com>, 'Michael Paquier' <michael(at)paquier(dot)xyz> |
Cc: | 'Laurenz Albe' <laurenz(dot)albe(at)cybertec(dot)at>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | RE: Problem during Windows service start |
Date: | 2019-02-22 06:09:30 |
Message-ID: | 0A3221C70F24FB45833433255569204D1FB9F7AF@G01JPEXMBYT05 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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 in PG 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 and accepts 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 startup processing...)
(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 some examples 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
From | Date | Subject | |
---|---|---|---|
Next Message | Tsunakawa, Takayuki | 2019-02-22 06:45:32 | RE: Libpq support to connect to standby server as priority |
Previous Message | Haribabu Kommi | 2019-02-22 05:14:55 | Re: Libpq support to connect to standby server as priority |