Re: DB Journalling? - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: DB Journalling?
Date
Msg-id Pine.GSO.4.02A.10004111331420.7708-100000@Myrslok.DoCS.UU.SE
Whole thread Raw
In response to DB Journalling?  (John Brothers <johnbr@undefined.com>)
List pgsql-general
On Tue, 11 Apr 2000, John Brothers wrote:

>    Two Linux Boxes.    Each runs Postgres, and both are connected
> to the same Network Attached Storage system.  For simplicity, lets
> assume that they're using NFS to talk to the NAS box, which internally
> contains a decent disk array.
>
>     There are two scenarios I am interested in:
>   1) both machines can operate the database at the same time.

Two words: Death and Destruction. (Well, newer versions will prevent you
from trying this in the first place.)

>    2) one machine operates the database, and the other operates
>        in hot standby mode.  When the primary fails, the secondary
>        takes over management of the database.

This seems feasable in theory. If you somehow found out that server #1 is
down you start a postmaster on the second one. Not a very "hot" failover
though.

However, I do believe that having the data area on NFS is not a wise thing
to do. There have been thread about this issue in the past, I suggest you
search the archives.

However, what about the NAS box going down? Of course some might argue
that a networked file system has a higher chance of failing than
PostgreSQL. :)

>   I suppose one can't do the former without some sort of atomic
> locking mechanism.   I would like to think one could do the latter,
> but if the first machine fails mid-write, how does the database
> recover, without some nifty journalling capability?

The same way a single-hosted database recovers when you turn of the power
in mid-write. The system is designed fairly safe against that if you have
fsync on. (Opinions vary here as well.) The details depend on what you
mean with "fail" of course.

Having said that, write-ahead logging (essentially journalling) is slated
to appear in 7.1, but that is only half of what you seem to need.

> If these aren't available, (specifically the second option) is there
> any idea when it might be available?  Is there anything financially or
> otherwise that my company can do to help?

Hire a couple of programmers and write the code. :) Most contributors
around here seem to have enough PostgreSQL-related plans for the near
future.


--
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden


pgsql-general by date:

Previous
From: John Brothers
Date:
Subject: DB Journalling?
Next
From: Silvio Macedo
Date:
Subject: Re: PostgreSQL-JDBC correct URL