Re: Mounting a data dir read only

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Thorsten Körner <t(dot)koerner(at)cappuccinosoft(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Mounting a data dir read only
Date: 2007-01-16 15:45:41
Message-ID: 20070116154541.GG8182@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-01-16 16:11:59 Re: [HACKERS] Checkpoint request failed on version 8.2.1.
Previous Message Gellert, Andre 2007-01-16 15:36:34 Re: Need setup help for Postgresql 8.1.3 on Solaris 10