Re: How to automatically start postmastrer with TCP/IP support (-i option) ??? - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: How to automatically start postmastrer with TCP/IP support (-i option) ???
Date
Msg-id Pine.LNX.4.30.0103051642380.777-100000@peter.localdomain
Whole thread Raw
In response to How to automatically start postmastrer with TCP/IP support (-i option) ???  ("Paulo Parola" <pgsql@brazilinfo.com>)
List pgsql-general
Paulo Parola writes:

> I am trying to configure PostgreSQL 7.1 over RedHat 7.0 (according to
> Lamar Owen the RPM's for 7.1 were built on RedHat 6.2 and not 7.0 -
> does that implies any possible problems?).

Always rebuild from the source RPM.  Never trust binary RPMs unless you
have the exact same OS.

> 1) How should I make so that PostgreSQL is automatically started
> accepting TCP/IP connections like I did by hand with the command above
> ( nohup /usr/bin/postmaster -i -D /var/lib/pgsql/data </dev/null
> >>server.log 2>>1 &) ??? Which file should I edit to add option '-i'
> for accepting TCP/IP connections?

In $PGDATA/postgresql.conf, add a line 'tcpip_socket = on'.

> Apparently, in shell script '/etc/rc.d/init.d/postgresql' the line
> that starts the postmaster reads 'su -l postgres -c "/usr/bin/pg_ctl
> -D $PGDATA -p /usr/bin/postmaster start >/dev/null 2>&1" < /dev/null',
> is that right?

No.  It discards the log output.

> 2) With which user shall I connect to the database? User "apache" or
> maybe user "nobody" ? Should I create a user 'apache' in PostgreSQL?

Doesn't matter, but you have to make a user in PostgreSQL.  System users
are not automatically PostgreSQL users.

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


pgsql-general by date:

Previous
From: Raymond Chui
Date:
Subject: Re: Does PostgreSQL support Constant Expression (Alias Name)?
Next
From: Rini Dutta
Date:
Subject: 'Unknown Result Type' - JDBC Driver