Thread: Re: binding TCP connections

Re: binding TCP connections

From
will trillich
Date:
Folks are asking me off-list:
> RE: http://archives2.us.postgresql.org/pgsql-general/2001-10/msg00448.php
> "binding tcp connections to certain addresses"
>
> Will:
>     Did you ever receive a response or resolution to this problem?  I
> am in the same situation, trying to bind the same IP's.
>
> If you can lend a hand, it would be most greatly appreciated!
>
> Thanks, in advance!

i did find out that /etc/postgresql/postgresql.conf can contain
a line such as

    virtual_host = '127.0.0.1'

using SINGLE QUOTES to delimit the IP address -- but successive
instances of that line such as

    virtual_host = '127.0.0.1'
    virtual_host = '192.168.1.1'

the latter will override/wipe out the former. i've tried taking
blind stabs in the dark such as

    virtual_host = '127.0.0.1','192.168.1.1'
    virtual_host = '127.0.0.1,192.168.1.1'

to no avail (errors in /var/log/postgresql.log):

    FATAL 1:  postgresql.conf:41: syntax error, token=","
    FATAL: StreamServerPort: gethostbyname(127.0.0.1,192.168.1.1) failed

any nudges are welcome. :)

(there's always the firewall/ipchains/iptables route, but surely
there's a postgresql-specific way to turn listening on and off
for several addresses?)

--
The only virus scanners I am aware of that run under linux are
designed to scan for Windows viruses in traffic that the linux
server is handling.
    -- Dave Sherohman, on debian-user

will@serensoft.com
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!

Re: binding TCP connections

From
Tom Lane
Date:
will trillich <will@serensoft.com> writes:
> (there's always the firewall/ipchains/iptables route, but surely
> there's a postgresql-specific way to turn listening on and off
> for several addresses?)

Nope, not unless you want to start a separate postmaster for each such
address.

Not real sure that I see the value of binding to N addresses rather
than to no-particular-address ...

            regards, tom lane