Thread: starting Postgres with TCP/IP enabled

starting Postgres with TCP/IP enabled

From
Sol
Date:
Hi,

I'm new to programming and postgres and have been going through the
manuals and trying out examples. Everything is going quite well but
there's one thing which hasn't been explained completely.

If I want to start Postgres with TCP/IP connections allowed I can do so
in a root shell thus:
postmaster -D /var/lib/pgsql/data/ -i

This can also be done with pg_ctl command. But how can this option be
set by default so that when postgres is started at boot time, that
TCP/IP connections are enabled already, so that it doesn't have to be
done manually?

I've looked at the script at /etc/init.d/postgresql but I don't really
know BASH very well and I couldn't see where (or whether) to alter this
script.

thankyou in advance; sol
--
==============================
Sol Hanna
solATautonomonDOTnet




Re: starting Postgres with TCP/IP enabled

From
Jean-Christian Imbeault
Date:
Sol wrote:

> This can also be done with pg_ctl command. But how can this option be
> set by default so that when postgres is started at boot time, that
> TCP/IP connections are enabled already, so that it doesn't have to be
> done manually?

Edit postgres.conf in the data directory. You need to allow TCP/IP
connection (default is false) and uncomment the line with the port
number on it.

That should do it I think,

Jean-Christian Imbeault


Re: starting Postgres with TCP/IP enabled

From
"A.Bhuvaneswaran"
Date:
> This can also be done with pg_ctl command. But how can this option be
> set by default so that when postgres is started at boot time, that
> TCP/IP connections are enabled already, so that it doesn't have to be
> done manually?

Set tcpip_socket = true in postgresql.conf.

regards,
bhuvaneswaran


Re: starting Postgres with TCP/IP enabled

From
Sol
Date:
Thankyou Jean-Christian and Bhuvaneswaran. It's sorted! :-)

cheers; sol





Jean-Christian Imbeault wrote:

>Sol wrote:
>
>
>
>>This can also be done with pg_ctl command. But how can this option be
>>set by default so that when postgres is started at boot time, that
>>TCP/IP connections are enabled already, so that it doesn't have to be
>>done manually?
>>
>>
>
>Edit postgres.conf in the data directory. You need to allow TCP/IP
>connection (default is false) and uncomment the line with the port
>number on it.
>
>That should do it I think,
>
>Jean-Christian Imbeault
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
>


--
==============================
Sol Hanna
solATautonomonDOTnet