RE: Problem during Windows service start - Mailing list pgsql-hackers

From Higuchi, Daisuke
Subject RE: Problem during Windows service start
Date
Msg-id 1803D792815FC24D871C00D17AE95905D795C9@g01jpexmbkw24
Whole thread Raw
In response to Re: Problem during Windows service start  (Laurenz Albe <laurenz.albe@cybertec.at>)
Responses Re: Problem during Windows service start  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
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
onlyPID 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
becauseof 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,
soincompatible change, I think. 
 

I would appreciate it if you give any comments. 

[1] https://github.com/postgres/postgres/commit/f13ea95f9e473a43ee4e1baeb94daaf83535d37c

Regards, 
Daisuke, Higuchi


Attachment

pgsql-hackers by date:

Previous
From: Haribabu Kommi
Date:
Subject: Re: New function pg_stat_statements_reset_query() to reset statisticsof a specific query
Next
From: Michael Paquier
Date:
Subject: Re: Problem during Windows service start