new feature: LDAP database name resolution - Mailing list pgsql-hackers

From Albe Laurenz
Subject new feature: LDAP database name resolution
Date
Msg-id 52EF20B2E3209443BC37736D00C3C13806F7DC50@EXADV1.host.magwien.gv.at
Whole thread Raw
Responses Re: new feature: LDAP database name resolution  (Martijn van Oosterhout <kleptog@svana.org>)
Re: new feature: LDAP database name resolution  (Andrew Sullivan <ajs@crankycanuck.ca>)
Re: new feature: LDAP database name resolution  (Philip Warner <pjw@rhyme.com.au>)
List pgsql-hackers
Dear developers of PostgreSQL!

We (City of Vienna) have many Oracle databases, but plan to use
PostgreSQL for our future database installations as much as possible.
The following idea is inspired by Oracle.

We sometimes need to move a database from one machine to another
(hardware old/broken, upgrades, etc.). Now whenever a database is
moved to a different computer, all the clients have to address the
database at the new hostname.

This is the idea:
Hostname, port number and database name are stored on an LDAP server,
and (e.g.) instead of accessing a database with
$ psql -h host -p port -d database .....
you'd use something like
$ psql -N dbalias ...
and the client would perform a lookup on the LDAP server and
retrieve host name, port and database name.

The advantage is that when you relocate a database, all you have
to change is an entry on the LDAP server.

I am aware that adding such a feature requires changes at many
levels: libpq, psql, libecpg, ecpg, a --with-ldap flag in configure
and probably some more.

I would be willing to try and implement this if you think that
it is a good thing and not a superfluous feature.
If you don't think that this should make its way into the
PostgreSQL source tree, I could also just write a little standalone
program that does the lookup and keep the stuff out of PostgreSQL.

However, if that sounds interesting, how should I go about it?
Just check out the latest development code, hack it and post a diff
somewhere in the hope that it finds acceptance?
I'll probably not be able to port and test it on all platforms supported
by PostgreSQL - is that a problem?

I'd be grateful for all hints and bits of advice you could give me.

Yours,
Laurenz Albe


pgsql-hackers by date:

Previous
From: Adam Witney
Date:
Subject: Re: Feature Request
Next
From: Martijn van Oosterhout
Date:
Subject: Re: new feature: LDAP database name resolution