[PLUG] Postgresql on NFS root box...

plug_0 at robinson-west.com plug_0 at robinson-west.com
Sun Feb 4 03:27:14 UTC 2007


Well, I have postgresql-7.14.3 server running on Slackware 10.1
using an init script of all things that came with the source code,
modified of course for everything being stuffed under /opt.

Okay, what happens when the processor on this NFS root system loses
power?  The filesystem, an NFS volume, will most likely stay up.

So what are the cases for what might be happening when the NFS root
box loses power?  How do transactions work and what happens when they
are interrupted?  The filesystem the NFS root box is using should
still be alive.  On the NFS server, I want to be able to restore a
snapshot of the database prior to the last attempted change
automatically, if that is needed.

Should I periodically create a tar bzipped archive of the database
and in the boot process restore the last trusted image?  If so,
how should I go about this?  Bash daemon?

If I have to add a battery to the NFS root box, that kinda defeats
the whole point of not having a hard drive installed.  A battery
though may give me a chance to keep the NFS root box up for a few
minutes in an outage allowing proper shutdown of the database and
other services.  Dansguardian and apache seem to come back just fine
if I hit the reset button on the NFS root box, but I highly suspect
that postgres may not.

Is there a way for postgres to mirror it's changes to another
postgres box running the exact same database?

Runlevel 1 and shutdown/reboot commands need to be replaced
on an NFS root box because you will hang the machine if you down
the network interface.  Anyone know how to replace the standard
shutdown/reboot procedures and runlevel 1?

For those who are about to say google, how could I efficiently google
for relevant information about preparing for power outages on an NFS
root box?

      Michael C. Robinson

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the PLUG mailing list