bug

Started by Nonameover 22 years ago2 messagespatches
Jump to latest
#1Noname
mlavenne2@yahoo.com

If PostgreSQL failed to compile on your computer or you found a bug that
is likely to be specific to one platform then please fill out this form
and e-mail it to pgsql-ports@postgresql.org.

To report any other bug, fill out the form below and e-mail it to
pgsql-bugs@postgresql.org.

If you not only found the problem but solved it and generated a patch
then e-mail it to pgsql-patches@postgresql.org instead. Please use the
command "diff -c" to generate the patch.

You may also enter a bug report at http://www.postgresql.org/ instead of
e-mail-ing this form.

============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================

Your name : max
Your email address : mlavenne2@yahoo.com

System Configuration
---------------------
Architecture (example: Intel Pentium) : AMD K6/2

Operating System (example: Linux 2.0.26 ELF) : Linux 2.4.20 (slackware)

PostgreSQL version (example: PostgreSQL-7.4): PostgreSQL-7.4

Compiler used (example: gcc 2.95.2) : gcc 3.2.2

Please enter a FULL description of your problem:
------------------------------------------------

I experienced a system crash (power related - my system is stable)
So, postmaster.pid was still there but had wrong pids and pgsql didn't restart
correcly for some reason.
Then, I tried to shut it down manually by using /etc/rc.d/rc.pgsql
(pointing to your startup script)

and it made my system hang. I don't have a console on my linux box, so I never undesrtood why
shutdown and reboot commands where hanging.

Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------

If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------

I patched it, here my diff -c pg_ctl pg_ctl_fixed:

==========================================================================
*** pg_ctl      Sat Nov 22 13:21:39 2003
--- pg_ctl_fixed        Sat Nov 22 13:21:14 2003
***************
*** 274,280 ****
        kill "$sig" $PID

# wait for postmaster to shut down
! if [ "$wait" = yes -o "$op" = restart ];then
cnt=0
$silence_echo $ECHO_N "waiting for postmaster to shut down..."$ECHO_C

--- 274,280 ----
        kill "$sig" $PID

# wait for postmaster to shut down
! if [ "$?" = 0 -a ["$wait" = yes -o "$op" = restart] ];then
cnt=0
$silence_echo $ECHO_N "waiting for postmaster to shut down..."$ECHO_C
=============================================================================

I added the test on the kill result, so that it doesn't wait for something that will never occur

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Noname (#1)
Re: bug

mlavenne2@yahoo.com writes:

I patched it, here my diff -c pg_ctl pg_ctl_fixed:

I think you probably broke it rather than fixed it. Checking whether
the kill worked isn't a bad idea, but you can't just plow ahead if it
failed.

regards, tom lane