Re: "Dynamic routing" to different databases

From: Alex Balashov <abalashov(at)evaristesys(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: "Dynamic routing" to different databases
Date: 2015-10-01 17:19:09
Message-ID: 560D6B0D.1010806@evaristesys.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Browse pgsql-admin by date

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