Re: troubles after updating from 7.4.2 to 7.4.3

Lists: pgsql-cygwin
From: "zuhans(at)iname(dot)com" <zuhans(at)iname(dot)com>
To: pgsql-cygwin(at)postgresql(dot)org
Subject: troubles after updating from 7.4.2 to 7.4.3
Date: 2004-06-24 12:52:52
Message-ID: 40DACEA4.5010309@iname.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

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


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 03:06:44
Message-ID: cbg4s9$utv$1@sea.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

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 broadcast)---------------------------
> 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
>


From: mike g <mike(at)thegodshalls(dot)com>
To: "zuhans(at)iname(dot)com" <zuhans(at)iname(dot)com>
Cc: pgsql-cygwin(at)postgresql(dot)org
Subject: Re: troubles after updating from 7.4.2 to 7.4.3
Date: 2004-06-25 03:24:03
Message-ID: 1088133843.2640.5.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

On Thu, 2004-06-24 at 07:52, 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
++CYGWIN=server
> echo
> echo "IPC-Daemon starten..."
++cygserver &
> --ipc-daemon2 &
> ps -f
> echo
> echo "PostgreSQL starten..."
++/var/postgresql/data &
> --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 /var/postgresql/data -s -m smart
> --pg_ctl stop -w -D /usr/share/postgresql/data -s -m smart
> ps -f
> echo
> echo "IPC-Daemon stoppen..."
++kill $(ps -f | grep cygserver | awk '{print $2}')
> --kill $(ps -f | grep ipc-d | awk '{print $2}')
> ps -f

the above assumes you ran cygserver.conf for the first time already.

See the cygserver and postgresql readme located in /usr/share/doc/Cygwin

Mike
>
> 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 broadcast)---------------------------
> 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


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$1@sea.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
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
www.postgresql.org 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
trouble.

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 postmaster.pid 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
dependency:

# 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.

>greetings
>hans
>
>
>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
broadcast)---------------------------
>>> 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
>>


From: "zuhans(at)iname(dot)com" <zuhans(at)iname(dot)com>
To: pgsql-cygwin(at)postgresql(dot)org
Subject: Re: troubles after updating from 7.4.2 to 7.4.3
Date: 2004-06-26 11:09:12
Message-ID: 40DD5958.6000304@iname.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-cygwin

hello frank,

thank you for pointing out the back-adress of my mails. i just hit the
answer-button and was already wrong... ;-)

i did - against a deep inner not-willing-to-do - some changes to my
scripts: especially using cygserver instead of ipc-daemon (after some
search i found, that cygserver is to be found under /usr/sbin - i had to
search because it didn't start with just saying "cygserver &"...).

[i really hate to do all those things, when everything was fine before
the (unnecessary) update. and i blame myselfe for always trying such
things. but it doesn't help to complain....]

now: i get a "bad system call" failure after the postmaster call. what
do i do now?

i searched the internet (postgresql.org isn't available today - which i
like very, very much...), but i only found something with "compiling the
kernel with ... modules" or similar. i don't know how to, and i really
don't want that to do.

i wonder, what was going on with my last update of cygwin.
i have an older version just copied away on a cd and i tried to recopy
it again. but that didn't work too.

is there a way to do this?

now i'm sitting here for nearly 2 days and trying and complaining and
trying... oh lord, why is it so complicated!

frank, i don't blame you!! it's the list, where i write this to - and
maybe there is somebody important out there, that knows how to make
those things more working than it does now.

greetings
hans

Frank Seesink schrieb:

> 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 www.postgresql.org 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 trouble.
>
> 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 postmaster.pid 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 dependency:
>
> # 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.
>
> >greetings
> >hans
> >
> >
> >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
> broadcast)---------------------------
> >>> 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
> >>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>