Re: Using PostgreSQL for NSS databases

From: Adam Tauno Williams <awilliam(at)whitemice(dot)org>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Using PostgreSQL for NSS databases
Date: 2012-11-05 11:01:19
Message-ID: 1352113279.4089.4.camel@workstation.wmmi.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2012-11-01 at 14:28 -0400, Daniel Popowich wrote:
> I'm making this post here in hopes I may save someone from beating
> their head against the wall like I did...
> I am writing a custom Name Service Switch (NSS) module to take
> advantage of already existing account information in a pg database.
> Under certain circumstances, processes will hang due to non-recursive
> mutex locking during PG connection creation. It goes something like
> this:
> ========================================
> /etc/nsswitch.conf:
> passwd: files mypgmod
> group: files mypgmod
> ========================================

As an old sys-admin who has been using LDAP NSS for decades I'd
recommend you look at the design of the newer nss_ldapd /sssd scheme
[vs. the old nss_ldap scheme]. This runs a simple daemon that servers
the responses to NSS over a local socket and manages a small pool of
connections back to the DSA [or in your case the PostgreSQL server].
This really improves performance, both for the client and the server as
well as avoiding many concurrency issues and intermittent network
issues.

nscd has numerous problems of its own.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Achilleas Mantzios 2012-11-05 11:14:37 Re: Memory issue on FreeBSD
Previous Message Richard Huxton 2012-11-05 10:48:06 Re: Recover from failed files