From: | "Douglas McNaught" <doug(at)mcnaught(dot)org> |
---|---|
To: | "Albretch Mueller" <lbrtchx(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: HA best pratices with postgreSQL |
Date: | 2008-06-19 02:36:28 |
Message-ID: | 5ded07e00806181936r52163339rd80f809885203662@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Jun 18, 2008 at 8:44 PM, Albretch Mueller <lbrtchx(at)gmail(dot)com> wrote:
> ~
> I am developing a J2EE application that needs for users to only read
> DB tables. All queries are select ones, no updates, no inserts, no
> deletes for web users, so I keep this ro DB tables in certain
> partitions which I mount as ro
> ~
> For performance reasons I keet the DB in the same box as the server
> ~
> Now, the data in those tables need to actually be updated not by web
> users, but from the back end and not that often at all, say just once
> of twice a day in a totally controlled way and updates shouldn't take
> long. Just some insert stats in single tables
[very roundabout approach deleted]
> ~
> Has any of you guys heard of something like that or how to basically
> achieve the same thing by other, more standard means?
Create a user for the J2EE app, and configure that app to connect as
that user. Grant only SELECT privileges to that user on the tables it
needs to see. Create a second user for the backend app and grant it
SELECT, INSERT, UPDATE, and DELETE on those tables.
There should be no need to mess about with read-only partitions or
anything like that. SQL permissions should be all you need.
-Doug
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2008-06-19 02:43:23 | Re: Forcibly vacating locks |
Previous Message | Tom Lane | 2008-06-19 01:30:17 | Re: migrating from mysql: need to convert empty string to null |