Re: Reading a live database - Mailing list pgsql-hackers

From Shridhar Daithankar
Subject Re: Reading a live database
Date
Msg-id 3D849F06.11330.1389AFB3@localhost
Whole thread Raw
In response to Reading a live database  ("D'Arcy J.M. Cain" <darcy@druid.net>)
List pgsql-hackers
On 14 Sep 2002 at 18:39, D'Arcy J.M. Cain wrote:

> I wonder how hard it would be to run a database server against a database 
> that is already being run.  The idea is to be able to do read only queries 
> against the database  from a different server on a shared NFS mounted 
> database.  The second server would need to be able to start in a mode that 
> ignored the lock and only allowed queries that read the database.  This would 
> allow many intensive report queries against a busy transaction database.
> 
> Possible?  Possible with a little work?  A lot of work?

I think it should be possible with the help of application.

Say you installation real time replication like usogres and replicate your 
database and connect to either of them for data selection, it should be 
possbile but it would need some code on application side to switch connections. 

Say you connect to master database for critical queries and to slave database 
for queries that are huge in data sets but used in statistical analysis where 
couple of rows here and there, still unsynced, would not matter much..Depends 
upon the application though...

Never used usogres so no idea how good that is. But if it does what it says, 
then I guess it should be possible.

Of course this is not exactly same is what you are asking for i.e. using same 
storage area. But this is an alternate approach where you can load balance the 
things.

Combined with HA-postgresql(http://www.taygeta.com/ha-postgresql.html), you 
should get a good redundancy with this approach. The technique described there 
does not use real time replication but I would prefer that if you are going to 
load balance your queries against multiple servers. Only thing is you need 
redundant storage in this scheme..

HTH

ByeShridhar

--
QOTD:    "I'd never marry a woman who didn't like pizza... I might play    golf with 
her, but I wouldn't marry her!"



pgsql-hackers by date:

Previous
From: "Michael Paesold"
Date:
Subject: Re: Indexes and differing column types
Next
From: Tom Lane
Date:
Subject: Proposal for resolving casting issues