Postgres failover

From: "Peter Schmidt" <peterjs(at)home(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Postgres failover
Date: 2000-12-11 20:55:30
Message-ID: NEBBJGEFMKLFIKBKBDIDAEEKCCAA.peterjs@home.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

PostgreSQL v7.0.2

My company is looking for a way to implement failover w/Postgres.

I've determined that two postmasters running on different machines (FreeBSD)
can share a single $PGDATA directory(NFS mount) as long as only one
postmaster is running at a time. Originally I thought I might be able to use
postmaster.pid to lock out the second postmaster, but the pid file is
overwritten by the second postmaster when it starts. I've tested a similar
approach using a "lockfile" i.e. create a file in $PGDATA and keep it locked
for the duration of postmaster. If a second postmaster tries to start up, it
can't because the lockfile is locked. When postmaster exits, the file is
unlinked, and the second postmaster is able to start.

Anyone have any thoughts or experiences with this? Comments?

TIA
Peter Schmidt

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Peter Eisentraut 2000-12-11 21:01:25 Re:
Previous Message Len Morgan 2000-12-11 20:38:14 Re: