Re: Docs for service file - Mailing list pgsql-patches

From Justin Clift
Subject Re: Docs for service file
Date
Msg-id 3E1B1E1C.10809@postgresql.org
Whole thread Raw
In response to Re: Docs for service file  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Docs for service file  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
Bruce Momjian wrote:
<snip>
>>b) A "service name" that works across-the-wire.  Oracle has something
>>like this, and has a "service name lookup daemon" thing in place that
>>remote clients can connect to through TCP in order to find out the
>>necessary parameters for connecting to a particular service.
>>
>>We should probably clarify a bit more on things before starting into voting.
>
>
> It seems strange how you would know where to get that connection info.
> I guess it could be used by just specifying the port number and host
> name, and some daemon would listen and set params.  That seems too
> involved to me, though.

Well, from memory the Oracle service name listener thing can be setup to
hold information about instances of oracle databases (services) on many
different servers, with whatever connection info is needed.

Equivalent functionality for us would be something like:

PG Service Name daemon
IP = 192.168.10.100, TCP = something

Holding info about:

Service name: Primary1
IP = 192.168.10.1, TCP = 5432, db name = foo

Service name: Primary2
IP = 192.168.10.10, TCP = 5432, db name = foo2

Service name: Dev1
IP = 192.168.10.2, TCP = 5432, db name = dev1

Service name: Dev2
IP = 192.168.10.2, TCP = 5432, db name = dev2

Service name: Dev3
IP = 192.168.10.2, TCP = 5433, db name = dev3

Service name: Dev4
IP = 192.168.10.3, TCP = 5432, db name = dev2b

Service name: Dev5
IP = 192.168.10.3, TCP = 5433, db name = dev3b

So, remote clients are configured to connect to the PG Service Name
daemon first in order to find out where their desired database is, etc.

Not sure how other DB systems do this kind of thing, this example is
just one part of how Oracle does it's service name resolution stuff.

:-)

Regards and best wishes,

Justin Clift

--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi


pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Docs for service file
Next
From: Bruce Momjian
Date:
Subject: Re: Docs for service file