RE: Problem during Windows service start

From: "Higuchi, Daisuke" <higuchi(dot)daisuke(at)jp(dot)fujitsu(dot)com>
To: 'Laurenz Albe' <laurenz(dot)albe(at)cybertec(dot)at>, "Sakai, Teppei" <sakai(dot)teppei(at)jp(dot)fujitsu(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: RE: Problem during Windows service start
Date: 2019-01-09 05:28:29
Message-ID: 1803D792815FC24D871C00D17AE95905D795C9@g01jpexmbkw24
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 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

Attachment Content-Type Size
windows_service_bug_fix.patch application/octet-stream 1.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2019-01-09 05:40:23 Re: Problem during Windows service start
Previous Message Haribabu Kommi 2019-01-09 04:56:20 Re: New function pg_stat_statements_reset_query() to reset statistics of a specific query