Re: pg_ctl configurable timeout - Mailing list pgsql-hackers

From Dave Page
Subject Re: pg_ctl configurable timeout
Date
Msg-id 200710292000490000@3024216390
Whole thread Raw
In response to pg_ctl configurable timeout  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers

> ------- Original Message -------
> From: Peter Eisentraut <peter_e@gmx.net>
> To: pgsql-hackers@postgresql.org
> Sent: 29/10/07, 17:54:00
> Subject: Re: [HACKERS] pg_ctl configurable timeout
> 
> Am Freitag, 17. August 2007 schrieb Peter Eisentraut:
> > I'm having trouble with the hardcoded 60 second timeout in pg_ctl.  pg_ctl
> > sometimes just times out and there is no way to make it wait a little
> > longer. I would like to add an option to be able to change that, say
> > pg_ctl -w --timeout=120.  Comments?
> 
> Lost track of this, but it keeps biting me.
> 
> Somehow, the 60 second timeout seems completely arbitrary anyway.  Maybe we 
> should remove it altogether.  We could add an option as described above, but 
> then the packager who creates the init script or whoever creates the initial 
> configuration will have to make an equally arbitrary choice.  And most likely 
> you will not notice that your configuration is insufficient until you are 
> really in a bind.
> 
> What should we do?

We need the option on Windows to prevent dependent services being started too quickly.

The same problem occurs there with pg_ctl reporting it's status to the service control manager. The scm interface
handlesthis by having the service regularly increment a variable, and if required, updating the estimated startup time.
Asimilar architecture might be feasible if we had the postmaster signal pg_ctl periodically until started at which
pointa different signal is sent. We then only timeout if no pulse or started signal is received within X seconds.
 

Regards, Dave


pgsql-hackers by date:

Previous
From: "Medi Montaseri"
Date:
Subject: Re: [ADMIN] grep command
Next
From: Bruce Momjian
Date:
Subject: Re: pg_ctl configurable timeout