Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 94232 - PostgreSQL server opens TCP/IP port even if I tell it not to
Summary: PostgreSQL server opens TCP/IP port even if I tell it not to
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: PgSQL Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-27 17:22 UTC by Frank T. Lofaro Jr.
Modified: 2007-09-22 23:41 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank T. Lofaro Jr. 2005-05-27 17:22:39 UTC
The PostgreSQL server opens a TCP/IP port even if I tell it not to. postmaster
is not being called with -i and I comment out the TCP/IP stuff in postgresql.conf.

Still opens the port.

My workaround: Try to get it to bind a reserved port. Since postgres doesn't run
as root, it can't, it throws an error but continues and the UNIX domain socket
support works fine.

Reproducible: Always
Steps to Reproduce:
1. Install PostgreSQL
2. Start it up, try to turn off TCP/IP support
3. netstat -at, it is listening on a port

Actual Results:  
PostgreSQL was listening on a TCP socket

Expected Results:  
Not opened any TCP socket.

Portage 2.0.51.22-r1 (default-linux/x86/2005.0, gcc-3.4.3-20050110, glibc-2.3.5-
r0, 2.6.11-gentoo-r9 i686)
=================================================================
System uname: 2.6.11-gentoo-r9 i686 Pentium II (Deschutes)
Gentoo Base System version 1.6.12
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.8
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.16
sys-devel/libtool:   1.5.18
virtual/os-headers:  2.6.11
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O9 -march=pentium2 -fomit-frame-pointer -fno-guess-branch-probability -
fsignaling-nans -mieee-fp"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share
/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/shar
e/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O9 -march=pentium2 -fomit-frame-pointer -fno-guess-branch-probability
 -fsignaling-nans -mieee-fp"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict userpriv"
GENTOO_MIRRORS="ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://gentoo.osuosl.org 
http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gento
o"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="x86 X Xaw3d acpi alsa apache2 apm arts avi bash-completion bcmath berkdb bi
tmap-fonts bmp bzlib cdparanoia cdr crypt cups curl emacs emacs-w3 emboss encode
 examples fam fastcgi fbcon foomaticdb fortran gd gdbm gif glut gpm gtk gtk2 ima
gemagick imlib ipv6 jpeg kde lcms libg++ libwww lmsensors mad matrox mikmod mp3 
mpeg ncurses nls nocd offensive ogg oggvorbis opengl oss pam pdflib perl png pos
tgres python qt quicktime readline sdl spell ssl svga sysvipc tcltk tcpd tidy ti
ff truetype truetype-fonts type1-fonts usb vorbis wddx x-face xml2 xmms xv yahoo
 zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 1 Frank T. Lofaro Jr. 2005-06-05 14:57:30 UTC
The problem ALSO happens if I unmask 8.0.3. I reported the bug against 8.0.2.

The bug is definitely in both versions.

Comment 2 Michael Kefeder 2005-06-18 06:23:30 UTC
reading $PGDATA/postgresql.conf it says the following:


#listen_addresses = 'localhost' # what IP interface(s) to listen on;
                                # defaults to localhost, '*' = any

simply set

listen_addresses = ''

and the problem goes away because it no longer uses the default. hope that
helps. IMO That setting should be changed, listening on localhost is not a good
default setting.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-12-10 11:59:58 UTC
Not a bug, as said in Comment #2.