Re: Single postgres for Multiple application

From: Twaha Daudi <uddessy(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Single postgres for Multiple application
Date: 2012-03-10 10:50:03
Message-ID: CAPj_VTDTmMiMDj_sRQHfm4UMxgcT58N5M8jLrLS-Xif8shUGzw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thomas,
Thank for your response may put this way.
Hello all,
Good day.
I have the following scenario.
System 1:
Database: postgresql 8.4
application server: tomcat 6

System 2:
Database: Postgresql 8.4
Application Server: Tomcat 6:

These system to be able to exchange data.

Then I would like to install it to use one postgresql 8.4 and one tomcat
6.all these run on the same machine but different system.

Is it possible?
Please any help appreciated
huu

On Sat, Mar 10, 2012 at 12:06 PM, Thomas Kellerer <spam_eater(at)gmx(dot)net>wrote:

> Twaha Daudi wrote on 10.03.2012 10:32:
>
> Hello all, Good day. I have installed postgres 8.4 on ubuntu 11.10
>> desktop.My interest is to test three web-based application.One is
>> drupal7.the other two still working on it.There should be possibility
>> of data transaction between them.The two web based will work with
>> tomcat instances(port:8080) while drupal7 normal Apache 2.0. Is it
>> possible? How can configure to achieve that?.any idea or tutorial
>> link appreciated.
>>
>> or the most important are those two application which use tomcat.
>> thank you huu
>>
>> As you say "there should be possibility of data transaction between
> them", you can't use databases to separate the individual application.
>
> You will need to setup schemas and corresponding users to achieve this:
>
> First you need to create three different users.
> Then for each user create one schema and make the corresponding user the
> owner of the schema.
>
> Set the user's search path such that their "own" schema is the only one in
> the list (or at least the first one).
> That way the application users don't have to prefix all tables.
>
> Something like this:
>
> create user u1 password 'welcome';
> create user u2 password 'welcome';
> create user u3 password 'welcome';
>
> create schema s1 authorization u1;
> create schema s2 authorization u2;
> create schema s3 authorization u3;
>
> alter user u1 set search_path to s1;
> alter user u2 set search_path to s2;
> alter user u3 set search_path to s3;
>
> commit;
>
> For those tables that need to be used by more than one user (i.e.
> application) grant the necessary privileges to the other users.
>
> Regards
> Thomas
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/**mailpref/pgsql-general<http://www.postgresql.org/mailpref/pgsql-general>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2012-03-10 17:42:56 Re: Error installing postgresq91-python package
Previous Message Thomas Kellerer 2012-03-10 10:06:59 Re: Single postgres for Multiple application