Thread: Server not listening... easy fix or workaround?

Server not listening... easy fix or workaround?

From
Rainer Schuetz
Date:
Hi,

I just installed Postgresql 8.4 on a MacBook (Snow Leopard) through Macports. All went fine down to the point where I
wantedto make configuration a bit more practical for myself ;) 

The server was installed nicely, I could initialize the default database, create passwords, users, databases, import my
saveddata from a older install and access all this through pgadmin. Pgadmin also offers the possibility to edit
configuration-files,but there is a problem: you have to be able to access them ;) and you can't offer file-system
credentialsthrough pgadmin (not that I knew you could). So I thought I add myself (the OSX-user) to the postgres group
andmake the defaultdb folders and file readable for the group and the .conf-files read-writable... As a result pgadmin
wouldn'tbe able to access the server any more with an error message starting similar to: the server is not listening at
127.0.0.1on port .... The server was still running as launchctl reported, but even a reboot, or a reconstruction of the
defaultdb-foldersthrough timemachine wouldn't make the server "listen" again. Obviously something security-related is
goingon of which I have no idea. Would somebody mind pointing me to a better practice or a workaround? Basically I just
wantto edit the configuration files through pgadmin... In a more general perspective I was also thinking about backing
upmy data through the file-system rather than manually dumping the files, because I could use my general
backup-softwarewhich runs periodically - but here as well I'd have to have read- and potentially also write access to
thedefaultdb folders... 
Thanks in advance
Rainer

Re: Server not listening... easy fix or workaround?

From
Tom Lane
Date:
Rainer Schuetz <rs@bagong.de> writes:
> The server was installed nicely, I could initialize the default
> database, create passwords, users, databases, import my saved data
> from a older install and access all this through pgadmin. Pgadmin also
> offers the possibility to edit configuration-files, but there is a
> problem: you have to be able to access them ;) and you can't offer
> file-system credentials through pgadmin (not that I knew you
> could). So I thought I add myself (the OSX-user) to the postgres group
> and make the defaultdb folders and file readable for the group and the
> .conf-files read-writable... As a result pgadmin wouldn't be able to
> access the server any more with an error message starting similar to:
> the server is not listening at 127.0.0.1 on port

If you look into the server's log file, you will probably find out that
it's refusing to start because of the insecure permissions on the data
directory.  Don't do that.  If you want to edit the config files you
need to be the postgres user.

            regards, tom lane