Skip site navigation (1) Skip section navigation (2)

Re: nscd [was] how do you run postgres without dns server

From: Ivan Dimitrov <dobber(at)bastun(dot)net>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: nscd [was] how do you run postgres without dns server
Date: 2004-11-10 15:19:47
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
Yes that is true too. I've checked it all. It apears that postgres tries to 
resolve only through dns'...:(

I think that the problem is in the postgresql, but I can't reproduce the 
problem anymore, because I was forced to install a caching dns server, and 
I'm not allowed to play with it anymore (business must run).

The nscd problem:
I didn't post this before, because I thik this is not a postgres related 
problem, but after a few hours playing with it I couldn't fix the problem
I have nscd + pgsql backend
I have 
passwd:         compat [NOTFOUND=continue SUCCESS=return] pgsql
group:          compat [NOTFOUND=continue SUCCESS=return] pgsql

in /etc/nsswitch.conf
The logic of this, from what I could understand from the documentation is:
"Look in the standart files (/etc/passwd, /etc/group)" for username and 
groups, if not found, search in pgsql databasee, else return successfull"

The problem is that when I stop the database and I try to `id realuser` it 
# id root
Could not connect to database

The system is Debian sarge with packages:
nscd                  2.3.2.ds1-18
libnss-pgsql1  1.0.2-1.2 
postgresql       7.4.5-3

На 10.11.2004 16:08 Oliver Elphick написа:
> On Wed, 2004-11-10 at 12:15 +0200, Ivan Dimitrov wrote:
> > Yes, it is there
> >        localhost
> > but when i strace postmaster on startup it never looks in /etc/hosts
> Look at the "hosts:" line in /etc/nsswitch.conf.  It needs to have the
> word "files" in there.


Hi! I'm your friendly neighbourhood signature virus.
Copy me to your signature file and help me spread!

In response to


pgsql-admin by date

Next:From: Sídar LCDate: 2004-11-10 20:48:02
Subject: Re: [ADMIN] Where is postgresql??
Previous:From: Oliver ElphickDate: 2004-11-10 14:08:07
Subject: Re: how do you run postgres without dns server

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group