Weiping He <laser@zhengmai.com.cn> writes:
> Later I use:
> pg_ctl start >pgrun.log 2>&1
> to start the program, and it runs ok. but, then the pmdie 2...
Hm. My first thought was that you needed a </dev/null in there too,
but it looks like pg_ctl does that for you. The other likely
possibility is that you need a "nohup" in front of all of this.
We should check the theory though. After you start the postmaster
using the above command, if you type control-C (or whatever your
favorite interrupt character is) on the same terminal, does the
postmaster shut down?
regards, tom lane