Skip site navigation (1) Skip section navigation (2)

pg_ctl -w (wait) option on Windows

From: Dave Page <dpage(at)postgresql(dot)org>
To: pgsql-patches(at)postgresql(dot)org
Subject: pg_ctl -w (wait) option on Windows
Date: 2007-06-26 19:39:38
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
The attached patch implements the following fixes to pg_ctl on Windows:

- Fix the -w (wait) option to work in Windows service mode, per bug 
#3382. This is required on Windows because pg_ctl reports running status 
to the service control manager when actually still in recovery/startup, 
causing any dependent services to start too early.

- Prevent the -w option being passed to the postmaster.

- Read the postmaster options file when starting as a Windows service.

As a side note, I noticed whilst testing this that the -w option relies 
on libpq to provide the username with which to connect to the server to 
test the connection. This will fail if that user is not the one that 
initialized the cluster, or if the superuser name has been changed. I 
hit the former case because I initdb'ed in my dev environment, and then 
setup the server to run as a service under a dedicated user account. I 
realise this won't affect normal users, and falls neatly into the 'don't 
do that then' category, but I thought I'd mention it :-)

Regards, Dave

Attachment: win32_wait3.diff
Description: text/plain (8.4 KB)


pgsql-patches by date

Next:From: Gregory StarkDate: 2007-06-26 19:54:49
Subject: Re: Load Distributed Checkpoints, final patch
Previous:From: Heikki LinnakangasDate: 2007-06-26 19:14:10
Subject: Re: Load Distributed Checkpoints, final patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group