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

Re: troubles after updating from 7.4.2 to 7.4.3

From: Frank Seesink <frank(at)mail(dot)wvnet(dot)edu>
To: pgsql-cygwin(at)postgresql(dot)org
Subject: Re: troubles after updating from 7.4.2 to 7.4.3
Date: 2004-06-25 13:09:34
Message-ID: cbh86j$hc1$ (view raw, whole thread or download thread mbox)
Lists: pgsql-cygwin
NOTE:  Please keep posts on the mailing list so others can learn from 
your experience (and we don't have to keep answering the same question).

On 6/25/2004 at 11:48 AM zuhans(at)iname(dot)com wrote:

 >hello frank,
 >thank you for your very helpful lines.
 >although i fixed one not-complete-package-install with your advice and
 >really found out, that postgres was not found, i now can start the
 >command postgres in the normal way but get an error: 584. if i call then
 >"ps" i find besides "postgresql" "bad system call".
 >now i had to check for myselfe: i found out, that in my script i didn't
 >call "postgresql" but "postmaster..." instead.

	I'm assuming you mean 'postgres' or 'postgres.exe' and not 
'postgresql', as there is no such executable.

 >is this the problem?
 >i must say, that i called those scripts very often and until now i had
 >really no problem. is there something very new to postgres?

	Not to my knowledge.  I upgraded from 7.4.1-3 to 7.4.3-1 recently and 
have had no issues (other than usual incorrect file permission settings 
in /usr/bin).  Other than the change that occurred with 7.4.2 where we 
no longer use ipc-daemon2 but rather use cygserver, I haven't had any 
trouble.  Note I followed the info posted when 7.4.2 was posted to and did a pg_dumpall/restore just to be safe.

	You mention your data path as /usr/share/postgresql/data, so I'm 
guessing you have been running PostgreSQL for awhile.  The path now 
recommended in Jason Tishler's README is /var/postgresql, so when I see 
/usr/share/postgresql, I'm guessing either a user has been running 
PostgreSQL for some time or they're working from outdated READMEs.  Note 
that for best results, always follow the README for the version of 
PostgreSQL you're using (in Cygwin found in /usr/share/doc/Cygwin/ ).

	And as you upgraded from 7.4.2, I'm assuming you already handled the 
changes from ipc-daemon2 to cygserver.  So not sure why you're having 

	Have you perused the mailing list archives, for example noting Patrick 
Erley's post from 17 June regarding the badcall issues, titled "Tips for 
initdb-problem Signal 12 and badcall with ipcs"?

	I'm afraid I don't have the same setup as you.  I am running Windows XP 
Pro SP1, Cygwin 1.5.10-3, PostgreSQL 7.4.3-1, and cygserver, with both 
cygserver and postmaster installed as Windows services.  I removed 
ipc-daemon2 as a service when I made the jump from 7.4.1 and installed 
cygserver, following the usual steps outlined such as adding 
CYGSERVER=server to my system environment variables.  Also deleted any 
leftover ipc-daemon2 files from /tmp to be safe, etc.

	  I basically follow Jason's README guidelines, with one exception.  My 
config requires PostgreSQL to launch on system startup.  One issue that 
can occur is that if the box bluescreens or PostgreSQL dies a vicious 
death, the file is not deleted.  This will prevent 
PostgreSQL's launch on startup, with only an entry in the Event Log to 
tip me off.  I'd rather, on system startup, delete any leftover .pid 
file and just have PostgreSQL start.  So I wrote a script to delete any 
leftover .pid files, launch it as an NT service on startup using a tool 
called FireDaemon (NT service name 'pgsqlstartup'), and then I installed 
postmaster as a service (step #4 in Jason's README), with one additional 

     # cygrunsrv --install postmaster --path /usr/bin/postmaster --args 
"-D /var/postgresql/data -i" --dep cygserver --dep pgsqlstartup 
--termsig INT --user postgres --shutdown

Other than this tweak, my install is very vanilla and follows the README.

	If possible, try not using your script but rather launch the pieces 
manually.  You might get better feedback.  That, and check in 
/var/log/postgresql for possible hints.  Not sure what else to tell you.

 >Frank Seesink schrieb:
 >> Hans,
 >> I have certain basic steps I follow when running Cygwin's setup.exe to
 >> update my Cygwin install.  Might help.
 >> 1.  Shutdown all Cygwin processes.
 >> 2.  Run setup.exe and update packages as usual.
 >> 3.  Run Cygwin BASH and execute following:
 >>     $ cygcheck -c > packages.lst
 >>     Filename unimportant & used as example.  cygcheck will validate your
 >>     installed packages with an 'OK'.  I output info to file so it's
 >>     easier to peruse.
 >> 4.  I check the output from #4 with
 >>     $ less packages.lst
 >>     If you see any that do NOT have 'OK' next to them, note them.  Then
 >>     repeat from step #1 until all packages say 'OK'.  I have found that
 >>     sometimes when using setup.exe, some of the packages apparently can
 >>     be mangled (or at least cygcheck thinks so).
 >> 5.  Once all is well install-wise, I do one last thing:
 >>     $ chmod a+rx /usr/bin /usr/bin/*
 >>     This is because sometimes the file permissions are not set right in
 >>     /usr/bin, and that is where postgres.exe is.
 >> This last step is likely your issue.  After updating, it's possible
 >> postgres.exe's file permissions were not set right.  If you simply type
 >>     $ postgres
 >> what do you get?  If it comes back 'command not found', there ya go.
 >> File permissions.  If postgres is set right, you should get an error
 >> message from postgres itself about not being able to find the data
 >> directory, etc.
 >> Hope this helps.
 >> zuhans(at)iname(dot)com wrote:
 >>> hello,
 >>> just for testing/programming (jdbc) purposes i used to start and stop
 >>> my postgresql 7.4.2 with two script files.
 >>> after cygwin-update the new version 7.4.3 is installed and my db
 >>> won't start any more!!
 >>> has it something to do with my scripts?
 >>> my start-db-script is:
 >>> #!/bin/sh
 >>> echo
 >>> echo "IPC-Daemon starten..."
 >>> ipc-daemon2 &
 >>> ps -f
 >>> echo
 >>> echo "PostgreSQL starten..."
 >>> postmaster -i -D /usr/share/postgresql/data &
 >>> ps -f
 >>> my stop-db-script is:
 >>> #!/bin/sh
 >>> echo
 >>> echo "PostgreSQL stoppen..."
 >>> pg_ctl stop -w -D /usr/share/postgresql/data -s -m smart
 >>> ps -f
 >>> echo
 >>> echo "IPC-Daemon stoppen..."
 >>> kill $(ps -f | grep ipc-d | awk '{print $2}')
 >>> ps -f
 >>> there is simply no error-message after my install-script, but i can't
 >>> connect to the server any more.
 >>> please help me! i must say that i'm a bloody beginner with postgresql!
 >>> greetings
 >>> hans
 >>> ---------------------------(end of 
 >>> TIP 3: if posting/reading through Usenet, please send an appropriate
 >>>      subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
 >>>      message can get through to the mailing list cleanly
 >> ---------------------------(end of broadcast)---------------------------
 >> TIP 4: Don't 'kill -9' the postmaster

In response to


pgsql-cygwin by date

Next:From: Lars OlssonDate: 2004-06-25 21:29:59
Subject: MapViewOfFileEx (0xF10000), Win32 error 487
Previous:From: - Barry -Date: 2004-06-25 10:04:36
Subject: Re: Uninstalling PostgreSQL

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