postgres only in local socket

Lists: pgsql-general
From: Developer <dev002(at)pas-world(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: postgres only in local socket
Date: 2009-04-28 11:34:00
Message-ID: 1240918440.18265.3.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hello,

In config:

> # - Connection Settings -
>
> #listen_addresses = 'localhost' # what IP address(es) to listen on;
> # comma-separated list of addresses;
> # defaults to 'localhost', '*' = all
> # (change requires restart)
> #port = 5432 # (change requires restart)
> max_connections = 100 # (change requires restart)
> # Note: Increasing max_connections costs ~400 bytes of shared memory per.
> # connection slot, plus lock space (see max_locks_per_transaction). You might
> # also need to raise shared_buffers to support more connections.
> #superuser_reserved_connections = 3 # (change requires restart)
> #unix_socket_directory = '' # (change requires restart)
> #unix_socket_group = '' # (change requires restart)
> #unix_socket_permissions = 0777 # begin with 0 to use octal notation
> # (change requires restart)
> #bonjour_name = '' # defaults to the computer name
>

With something like this, I can see using netstat:

> tcp 0 0 localhost.localdom:postgres *:* LISTEN
>

How to "listen" only in local socket?

--

--
--
Publicidad y Servicios http://www.pas-world.com
Directorio http://www.precioventa.com
Tienda http://informatica.precioventa.com
Autoridad certificadora http://ca.precioventa.com
--
--


From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: postgres only in local socket
Date: 2009-04-28 12:40:58
Message-ID: gt6tgq$kao$3@reversiblemaps.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

On 2009-04-28, Developer <dev002(at)pas-world(dot)com> wrote:
> Hello,
>
> In config:
>

>> #listen_addresses = 'localhost' # what IP address(es) to listen on;
>> # comma-separated list of addresses;
>> # defaults to 'localhost', '*' = all
>> # (change requires restart)
>> #port = 5432 # (change requires restart)
>> max_connections = 100 # (change requires restart)

> How to "listen" only in local socket?

listen_addresses=''

assuming you only want only local unix domain sockets (and not localhost TCP/IP)

that seems to work here.


From: Bill Moran <wmoran(at)potentialtech(dot)com>
To: Developer <dev002(at)pas-world(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: postgres only in local socket
Date: 2009-04-28 12:44:50
Message-ID: 20090428084450.7276ecc2.wmoran@potentialtech.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

In response to Developer <dev002(at)pas-world(dot)com>:

> Hello,
>
> In config:
>
> > # - Connection Settings -
> >
> > #listen_addresses = 'localhost' # what IP address(es) to listen on;
> > # comma-separated list of addresses;
> > # defaults to 'localhost', '*' = all
> > # (change requires restart)
> > #port = 5432 # (change requires restart)
> > max_connections = 100 # (change requires restart)
> > # Note: Increasing max_connections costs ~400 bytes of shared memory per.
> > # connection slot, plus lock space (see max_locks_per_transaction). You might
> > # also need to raise shared_buffers to support more connections.
> > #superuser_reserved_connections = 3 # (change requires restart)
> > #unix_socket_directory = '' # (change requires restart)
> > #unix_socket_group = '' # (change requires restart)
> > #unix_socket_permissions = 0777 # begin with 0 to use octal notation
> > # (change requires restart)
> > #bonjour_name = '' # defaults to the computer name
> >
>
>
> With something like this, I can see using netstat:
>
> > tcp 0 0 localhost.localdom:postgres *:* LISTEN
> >
>
>
> How to "listen" only in local socket?

Uncomment the listen line and fill it with a comma separated list of
IPs to listen on. Or take Jasen's advice, if that fits your need.

--
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/


From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: postgres only in local socket
Date: 2009-04-28 12:46:36
Message-ID: 20090428124636.GF13320@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

In response to Developer :
> How to "listen" only in local socket?

Set in your postgresql.conf:

listen_addresses = ''

(uncomment this line and set the value to '')

Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net