Re: Mounting a data dir read only

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Mounting a data dir read only
Дата
Msg-id 20070116154541.GG8182@svana.org
обсуждение исходный текст
Ответ на Mounting a data dir read only  (Thorsten Körner <t.koerner@cappuccinosoft.de>)
Ответы Re: Mounting a data dir read only  (Thorsten Körner <t.koerner@cappuccinosoft.de>)
Список 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.

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Thorsten Körner
Дата:
Сообщение: Mounting a data dir read only
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Checkpoint request failed on version 8.2.1.