Re: Postgres on shared network drive

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
Cc: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Postgres on shared network drive
Date: 2008-04-11 12:54:37
Message-ID: 47FF5F8D.7030405@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Pavan Deolasee wrote:
>
> I wonder if it would make sense to add support to mount database in
> *read-only* mode from multiple servers though. I am thinking about
> data warehouse kind of operations where multiple servers can be
> used answer read-only queries. Is there a use case for such applications
> in real world ?
>
I'm not sure that makes sense myself. The reason you 'd want multiple
read only instances is for performance and/or redundancy. Neither of
those goals are well served by having a shared data store.

A shared data store won't help performance much because both instances
will compete for I/O bandwidth. It might be faster if most of the
regularly used data and indexes fit in memory on the host, but even then
I'd personally be surprised if the cost of the network/shared storage
didn't counteract that at least in part.

For redundancy, you ideally want to avoid shared infrastructure that can
fail - like shared storage. It's likely to be better to keep separate
copies of the data store on each host.

There are systems - like Slony-I and log shipping replication - that can
keep servers in sync without shared storage, and are almost certainly
more useful than shared-storage DB servers.

What I do think would be very interesting would be the ability to have a
DB serving read-only queries while still reading in shipped WAL archives
as they arrive. That'd be a potential big win on performance because
each DB server could have its own I/O system, CPUs and RAM . With some
trickyness you could even forward queries that did require writes to the
master server transparently, while servicing read only queries locally.

--
Craig Ringer

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stefan Sturm 2008-04-11 13:09:43 PostgreSQL Processes on a linux box
Previous Message Obe, Regina 2008-04-11 12:48:36 Operator COMMUTATOR - how does postgresql use this information