Re: Data replication through disk replication

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Data replication through disk replication
Дата
Msg-id 20070518131241.GB29115@svana.org
обсуждение исходный текст
Ответ на Data replication through disk replication  (Thomas Lopatic <thomas@lopatic.de>)
Список pgsql-general
On Fri, May 18, 2007 at 02:48:03PM +0200, Thomas Lopatic wrote:
> What I keep wondering: Isn't there substantial risk involved?
> I mean, suppose the master fails in the middle of a write. Isn't there
> the possibility that this corrupts the database? How robust is
> PostgreSQL's on-disk file format and write caching strategy against
> failures like this?

It would seem slightly more risk, but as long as the filesystem honours
fsync and doesn't mess with the order of the disk writes, then the
standard WAL log should protect you fine.  All you need to be sure of
is that the write to WAL gets written to disk before the actual data
files do.

> With something like Slony-I some data may not be fully copied to the
> slave when the master crashes. So there may be data loss. But there
> isn't the risk of database corruption.

The biggest benefit to Slony in my eyes is that it's asyncronous. If
the network connection dies, slony can handle that but I have no idea
what your DRDB might do...

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 по дате отправления:

Предыдущее
От: Thomas Lopatic
Дата:
Сообщение: Data replication through disk replication
Следующее
От: Florian Weimer
Дата:
Сообщение: Re: Memory settings, vm.overcommit, how to get it really safe?