Re: Mounting a data dir read only - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Mounting a data dir read only
Date
Msg-id 20070116154541.GG8182@svana.org
Whole thread Raw
In response to Mounting a data dir read only  (Thorsten Körner <t.koerner@cappuccinosoft.de>)
Responses Re: Mounting a data dir read only  (Thorsten Körner <t.koerner@cappuccinosoft.de>)
List pgsql-general
On Tue, Jan 16, 2007 at 04:35:24PM +0100, Thorsten Körner wrote:
> Hi all,
>
> I'm wondering if it is possible to connect a postgresql 8.2 server to a
> datadir in readonly mode.
> We actually want to implement a very large project, using postgresql database,
> with pgpool. Our idea is, that one postgres instance, can read/write to the
> files, while the other one should only read.
> To avoid corruption, we want to set the second instance to read-only mode.

It would avoid corruption on disk, but the second server will not get
the right data. The first server doesn't have any compulsion to write
out data blocks at the end of a transaction, so the second server will
read rubbish.

> Is there a way to set such parameters, within startup parameters?

Nope, do proper replication, either WAL-shipping, or slony, or
something.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment

pgsql-general by date:

Previous
From: Thorsten Körner
Date:
Subject: Mounting a data dir read only
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Checkpoint request failed on version 8.2.1.