Hi, This thread is inactive, but I want to solve this problem. I think this problem rarely occurs in 10 or later version because of commit [1]. Because "pg_ctl start -w" wait for only PID file creation. It means that timeout is not occurred even if crash recovery takes a lot of times. However, 9.6 or earlier still wait for long time recovery complete.
> How do you propose to fix it? I think there are two solutions. One solution is that status of Windows Service should be changed to "SERVICE_RUNNING" even if timeout is occurred because of long time recovery. I attached the patch of this solution. Another solution is to backport commit [1] to 9.6 or earlier version. However this fix change the content of PID file, so incompatible change, I think. I would appreciate it if you give any comments. [1] https://github.com/postgres/postgres/commit/f13ea95f9e473a43ee4e1baeb94daaf83535d37c Regards, Daisuke, Higuchi
windows_service_bug_fix.patch
Description: windows_service_bug_fix.patch