[ic] starting postmaster with "-i" option with demo database

Art Popp interchange-users@interchange.redhat.com
Fri Mar 8 12:45:01 2002


Gill, Jeffrey L wrote:


>> How do you automatically start the postmaster with the "-i" option to allow
>> TCP/IP connections 
>

Andrew McBeath's advice seems like an excellent solution, and his 
instructions making sure the
database was initialized would have saved me an hour's worth of 
headscratching when I first
started running Postgresql.

I'm running RH 7.2, with PostgreSQL 7.1, and when trying to set up 
Internet access I was impressed (intimidated by?)
all the work pg_ctl seems to do to properly start the postmaster.  Not 
understanding all that was going on, I wanted
to plant the -i in the options with the least impact on all the parts I 
didn't understand.

line 321-328 of /usr/bin/pg_ctl
________________________________________________________
    if [ -n "$logfile" ]; then
        "$po_path" "-i" "$@"  </dev/null >>$logfile 2>&1 &
    else
        # when starting without log file, redirect stderr to stdout, so
        # pg_ctl can be invoked with >$logfile and still have pg_ctl's
        # stderr on the terminal.
        "$po_path" "-i" "$@" </dev/null 2>&1 &
    fi
________________________________________________________

    I inserted the "-i"'s on the second line from the top and second 
from the bottom.  And it works nicely.

Art