Re: "Dynamic routing" to different databases - Mailing list pgsql-admin

From Alex Balashov
Subject Re: "Dynamic routing" to different databases
Date
Msg-id 560D6B0D.1010806@evaristesys.com
Whole thread Raw
In response to Re: "Dynamic routing" to different databases  ("Nicholson, Brad (Toronto, ON, CA)" <bnicholson@hpe.com>)
List pgsql-admin
Brad,

On 10/01/2015 12:48 PM, Nicholson, Brad (Toronto, ON, CA) wrote:

> You can set the default search path on a per-role/user basis.  What
> you could do is map a DB user (or set of users) to a specific schema,
> then set that users search path for the appropriate schema and the
> queries will automatically get routed to the appropriate schema.
> Segmenting your different applications user also allows you to use
> the role system to restrict access to the data between applications.

I'd love to, but unfortunately the service consuming the database is
very, very strictly limited to one connection string, which entails one
set of credentials, one server and one database, and more connections
cannot be created as-needed at runtime without restarting the service,
which in our industry is not acceptable.

So, unfortunately I cannot avail myself of such an elegant solution;
instead, I must access all the schemas via one role.

-- Alex

--
Alex Balashov | Principal | Evariste Systems LLC
303 Perimeter Center North, Suite 300
Atlanta, GA 30346
United States

Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct)
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/


pgsql-admin by date:

Previous
From: "Nicholson, Brad (Toronto, ON, CA)"
Date:
Subject: Re: "Dynamic routing" to different databases
Next
From: Jan
Date:
Subject: Long-running and non-finishing VACUUM ANALYZE on large table