Re: Postgres on shared network drive - Mailing list pgsql-general

From Craig Ringer
Subject Re: Postgres on shared network drive
Date
Msg-id 47FF5F8D.7030405@postnewspapers.com.au
Whole thread Raw
In response to Re: Postgres on shared network drive  ("Pavan Deolasee" <pavan.deolasee@gmail.com>)
Responses Re: Postgres on shared network drive  ("Dawid Kuroczko" <qnex42@gmail.com>)
List 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

pgsql-general by date:

Previous
From: "Obe, Regina"
Date:
Subject: Operator COMMUTATOR - how does postgresql use this information
Next
From: Stefan Sturm
Date:
Subject: PostgreSQL Processes on a linux box