Postgres failover

Поиск
Список
Период
Сортировка
От Peter Schmidt
Тема Postgres failover
Дата
Msg-id NEBBJGEFMKLFIKBKBDIDAEEKCCAA.peterjs@home.com
обсуждение исходный текст
Ответы Re: Postgres failover  (Ragnar Kjørstad <postgres@ragnark.vestdata.no>)
Список 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


В списке pgsql-admin по дате отправления:

Предыдущее
От: "Jimi Thompson"
Дата:
Сообщение: Re: Implementing mod_perl, Perl 5.004, and Postgres
Следующее
От: "Dana Hudes"
Дата:
Сообщение: Re: Implementing mod_perl, Perl 5.004, and Postgres