[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    Re: [GENERAL] Strange pg_ctl behavior: postmaster shuts down on shell interrupt
From:       Tom Lane <tgl () sss ! pgh ! pa ! us>
Date:       2006-09-30 20:49:31
Message-ID: 16809.1159649371 () sss ! pgh ! pa ! us
[Download RAW message or body]

"smartdude" <in4tunio@gmail.com> writes:
> We use postgres 8.0.4 for our application on Linux ES3 kernel 2.4.21-4.
> We wrote a small shell script for starting postgres, which does little
> more than just calling postmaster. We trap interrupt signal in the
> shell script to allow postgres to start even if interrupted by the
> user.

"trap" only sets the shell's response to signals, not that of programs
started by the shell.  You're going at this entirely the wrong way:
what you need is to make sure the postmaster is dissociated from your
terminal so it doesn't get signals from the keyboard in the first place.
I believe what you need to add is a "-l logfile" option to the pg_ctl
call so that the postmaster's stdout gets disconnected from the
terminal.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic