Re: Postmaster Vr. 7.4.5 don't start on Cygwin 1.5.18 - Mailing list pgsql-cygwin

From Robson Richieri
Subject Re: Postmaster Vr. 7.4.5 don't start on Cygwin 1.5.18
Date
Msg-id 009d01c5d584$22c91510$8300a8c0@Robson
Whole thread Raw
In response to Postmaster Vr. 7.4.5 don't start on Cygwin 1.5.18  ("Robson Richieri" <rrichieri@nexion.com.br>)
List pgsql-cygwin
 
If anyone else has the same problem, I myself found out a solution reading other messages in this user list and I hope this can help them. Here are the steps I did in order to bring to life PostgreSql 7.4.5 that was not working on Cygwin 1.5.18.
 
I downloaded a snapshot (2005-Oct-19) of DLL cygwin from
 
and installed the following files:
 
cygwin1-20051019.dll.bz2       (in /bin directory)
cygwin-inst-20051019.tar.bz2  (in their respective /usr sub-directories)
 
Then, I repeated only the first, 7th and 8th steps described in "postgresql-7.4.5.README" document, which install and start the cygserver as a NT service and initialize postgresql, since the other steps were valid from the previous installation (I already had a "postgres" user account and also the postmaster as a NT service installed).
At this time, I realized I could run under the "postgres" account using the command below on a DOS window prompt:
 
RunAs /user:postgres "C:\Cygwin\cygwin.bat"
 
As a "postgres" account, I could empty the directory /var/postgresql/data to initialize PostgreSQL cleanly:
 
initdb -D /var/postgresql/data
 
as described at step 8 of that document. I tried to start postmaster using "cygrunsrv -S postmaster", but it did not work. So, I tried the command (either as a "postgres" account):
 
/bin/pg_ctl start -D /var/postgresql/data -l /var/postgresql/data/postmaster.log
 
and "voilá", postmaster started running!
 
Using command:
 
psql -l
 
I could verify that it was ok:
 
                   List of databases
     Name        |     Owner      |   Encoding
------------------+-----------------+---------------------
 template0     |   postgres    |   SQL_ASCII
 template1     |   postgres    |   SQL_ASCII
 
 
Thanks a lot to Vladimir Tsvetkov and other guys from this list for their suggestions, and excuse me all for this too long message
(I like to explain in details!!!).
 
Robson Richieri.
 
 
----- Original Message -----
Sent: Thursday, August 04, 2005 1:15 PM
Subject: Postmaster Vr. 7.4.5 don't start on Cygwin 1.5.18

Hi, could anyone help me?
 
I upgrade Cygwin (the old version run Postgres 7.1.2 with no problem, using ipc-daemon) and followed the steps conform document "postgresql-7.4.5.README" v 1.56 2004/06/26 14:13:29.
 
I tried to install PostgreSQL type NT services under Win2000. From step 1 to 7, everything worked fine. At step 8, I had to login on Windows with user name "postgres" and the password I had determined when I created the "postgres" user account (step 2), because I could NOT simulate command "su" on Cygwin (I didn't have a service to authenticate ssh conection, nor the command "RunAs" worked well: it always reported that the user or password was invalid!).
 
NOTE 1: my computer runs Win2000 on a private network with a Linux Server running Samba as a PDC (Primary Domain Controller). So, at this point, I logged the user "postgres" out of the domain, that is, I set up the domain as my local machine.
 
Ok,  "initdb" finished succesfully. But, when I run the command on step 9 "cygrunsrv -S postmaster", after some time it returns the following error:
 
cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error 1053: the service did not answer to initial or control request on time
 
NOTE 2: after the number 1053 above, the translation is mine since the description of the error is in portuguese; sorry for incorrections.
 
When I looked at the window "Services" from Admin Tools of Windows, it showed a line "postmaster" with the status "starting". And this service only could be stopped using the Task Manager of Windows by means of selecting the corresponding cygrunsrv process and forcing its stop. The use of option "-E" of cygrunsrv process did not work for the same reason: a time-out error!
 
Finally, the command on step 10 "cygrunsrv -Q postmaster" given before the stopping of the service, displayed the information bellow:
 
Service            : postmaster
Current State      : Start Pending   <<<---- ?!
Controls Accepted  : Stop, Shutdown
Command            : /usr/bin/postmaster -D /var/postgresql/data -i
 
The Cygwin itself works very well, so what's wrong with PostgreSQL? I apreciate if anybody could help me to solve this problem.
 
Thanks, very much!
 
Robson Richieri
 

pgsql-cygwin by date:

Previous
From: "krishnaa sridharan"
Date:
Subject: install error
Next
From: "Costa, Rodrigo Alves"
Date:
Subject: Postmaster core dumps