pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Problem binding postmaster to several interfaces
3+ messages / 2 participants
[nested] [flat]

* Problem binding postmaster to several interfaces
@ 2005-02-14 12:24  Milen A. Radev <mradev@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Milen A. Radev @ 2005-02-14 12:24 UTC (permalink / raw)
  To: pgsql-admin

Hi everyone!

I have postgresql 8.0.1 installed on a Slackware Linux machine. The
machine is a multi-purpose device and it has external and internal
interfaces. I would like to limit "postmaster" to listen only to the
internal interface and the loopback. I tried to use the new
"listen_addresses" directive but with no success so far. I tried
several forms - I either got a syntax error, or the "postmaster"
continued to listen to all interfaces - (0.0.0.0:5432 as shown by
"netstat -tupan" command).

Any ideas?

The current value of my "listen_addresses" setting is:
listen_addresses = '192.168.0.1, 127.0.0.1'

but using "netstat -tupan" I still see:

tcp        0      0 0.0.0.0:5432            0.0.0.0:*              
LISTEN      10042/postmaster

The contents of the logfile for the last reboot is:

2005-02-14 14:14:55.105721500 LOG:  received smart shutdown request
2005-02-14 14:14:55.105728500 LOG:  shutting down
2005-02-14 14:14:55.255392500 LOG:  database system is shut down
2005-02-14 14:15:08.852971500 LOG:  could not create IPv6 socket:
Address family not supported by protocol
2005-02-14 14:15:08.880414500 LOG:  database system was shut down at
2005-02-14 14:15:17 EET
2005-02-14 14:15:08.880987500 LOG:  checkpoint record is at 0/DBA864
2005-02-14 14:15:08.881059500 LOG:  redo record is at 0/DBA864; undo
record is at 0/0; shutdown TRUE
2005-02-14 14:15:08.881112500 LOG:  next transaction ID: 4243; next OID: 17395
2005-02-14 14:15:08.927491500 LOG:  database system is ready




The server was build with:

./configure --prefix=/usr/local/postgresql --with-openssl
--with-python --with-php=/usr/src/php-4.3.10 --enable-nls

The system is Slackware Linux 9.1.0 with kernel "Linux xxxxxxl 2.6.10
#1 Wed Feb 2 22:59:49 EET 2005 i686 unknown unknown GNU/Linux".

-- 
Milen A. Radev



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Problem binding postmaster to several interfaces
@ 2005-02-14 17:14  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Milen A. Radev <mradev@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2005-02-14 17:14 UTC (permalink / raw)
  To: milen@radev.net; +Cc: pgsql-admin

"Milen A. Radev" <mradev@gmail.com> writes:
> The current value of my "listen_addresses" setting is:
> listen_addresses = '192.168.0.1, 127.0.0.1'

Nothing wrong with that.

> but using "netstat -tupan" I still see:

> tcp        0      0 0.0.0.0:5432            0.0.0.0:*              
> LISTEN      10042/postmaster

Are you by any chance using "-i" on the postmaster command line?  That
overrides whatever you put for listen_addresses in the config file.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Problem binding postmaster to several interfaces
@ 2005-02-14 19:32  Milen A. Radev <mradev@gmail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Milen A. Radev @ 2005-02-14 19:32 UTC (permalink / raw)
  To: pgsql-admin

On Mon, 14 Feb 2005 12:14:33 -0500, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Milen A. Radev" <mradev@gmail.com> writes:
> > The current value of my "listen_addresses" setting is:
> > listen_addresses = '192.168.0.1, 127.0.0.1'
> 
> Nothing wrong with that.
> 
> > but using "netstat -tupan" I still see:
> 
> > tcp        0      0 0.0.0.0:5432            0.0.0.0:*
> > LISTEN      10042/postmaster
> 
> Are you by any chance using "-i" on the postmaster command line?  That
> overrides whatever you put for listen_addresses in the config file.

Yep, that was. I use custom script for supervising postmaster with
daemontools. And I failed to notice this change in the behaviour in
v8.0.

Thanks a lot.

> 
>                         regards, tom lane
> 



-- 
Milen A. Radev



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2005-02-14 19:32 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-02-14 12:24 Problem binding postmaster to several interfaces Milen A. Radev <mradev@gmail.com>
2005-02-14 17:14 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-02-14 19:32   ` Milen A. Radev <mradev@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox