Reading a live database

Started by D'Arcy J.M. Cainover 23 years ago4 messages
#1D'Arcy J.M. Cain
darcy@druid.net

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?

Another question, can a database server for one system (e.g. NetBSD on i386)
run a database originally created on another (e.g. AIX on RS6000) or are
there binary incompatibilities?

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: D'Arcy J.M. Cain (#1)
Re: Reading a live database

"D'Arcy J.M. Cain" <darcy@druid.net> writes:

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 odds of this are nil, unless maybe *all* the servers treat the
database as read-only, which doesn't seem very interesting.

Another question, can a database server for one system (e.g. NetBSD on i386)
run a database originally created on another (e.g. AIX on RS6000) or are
there binary incompatibilities?

There are binary incompatibilities if the platforms have differences in
endianness, alignment, or floating-point formats.

regards, tom lane

#3D'Arcy J.M. Cain
darcy@druid.net
In reply to: Tom Lane (#2)
Re: Reading a live database

On September 14, 2002 06:53 pm, Tom Lane wrote:

"D'Arcy J.M. Cain" <darcy@druid.net> writes:

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 odds of this are nil, unless maybe *all* the servers treat the
database as read-only, which doesn't seem very interesting.

Yah, wishful thinking on my part. :-(

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.
#4Shridhar Daithankar
shridhar_daithankar@persistent.co.in
In reply to: D'Arcy J.M. Cain (#1)
Re: Reading a live database

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

Bye
Shridhar

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