pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ivan Dimitrov <dobber@bastun.net>
To: pgsql-admin@postgresql.org
Subject: Re: nscd [was] how do you run postgres without dns server
Date: Wed, 10 Nov 2004 17:19:47 +0200
Message-ID: <200411101719.52463.dobber@bastun.net> (raw)
In-Reply-To: <1100095687.29685.89.camel@linda>
References: <200411101145.24279.dobber@bastun.net>
	<200411101215.42767.dobber@bastun.net>
	<1100095687.29685.89.camel@linda>

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 
gives:
# 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
> > 127.0.0.1        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!

view thread (2+ messages)  latest in thread

Message-ID: <200411101719.52463.dobber@bastun.net>
Permalink:  ../200411101719.52463.dobber@bastun.net/
Also on:    postgresql.org/message-id/200411101719.52463.dobber@bastun.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: dobber@bastun.net
  Subject: Re: nscd [was] how do you run postgres without dns server
  In-Reply-To: <200411101719.52463.dobber@bastun.net>
  References: <200411101145.24279.dobber@bastun.net> <200411101215.42767.dobber@bastun.net> <1100095687.29685.89.camel@linda> <200411101719.52463.dobber@bastun.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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