Re: DB Journalling?

From: Peter Eisentraut <e99re41(at)DoCS(dot)UU(dot)SE>
To: John Brothers <johnbr(at)undefined(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: DB Journalling?
Date: 2000-04-11 11:45:28
Message-ID: Pine.GSO.4.02A.10004111331420.7708-100000@Myrslok.DoCS.UU.SE
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Silvio Macedo 2000-04-11 11:56:10 Re: PostgreSQL-JDBC correct URL
Previous Message John Brothers 2000-04-11 10:58:00 DB Journalling?