Обсуждение: dbmirror -- recovery question

Поиск
Список
Период
Сортировка

dbmirror -- recovery question

От
"Gregory S. Williamson"
Дата:
Dear peoples,

  I'm setting up a database in postgres which will have light traffic writing to a few tables (and somewhat heavier
trafficreading them). We'd like to mirror that databse using dbmirror to two others. 

  Let's assume that we're humming along and the master goes down. We switch traffic to read from one of  the two
slaves.

  What happens if we feel a need to add information while the master is down ?  Reconfigure that former slave to be a
masterand then manually reconcile the former master when it is available, perhaps ? 

  I didn't see anything in the documentation or in the postgres site about this (and I looked through the archives for
referencesto dbmirror), so I apologize if I am issuing a faq. 

  Thanks,

  Greg Williamson
  DBA
  GlobeXplorer LLC

Re: dbmirror -- recovery question

От
Dobrica Pavlinusic
Дата:
In article <71E37EF6B7DCC1499CEA0316A256832801057048@loki.globexplorer.com>,
"Gregory S. Williamson" wrote:
>   I'm setting up a database in postgres which will have light traffic
> writing to a few tables (and somewhat heavier traffic reading them). We'd
> like to mirror that databse using dbmirror to two others.
>
>   Let's assume that we're humming along and the master goes down. We switch traffic to read from one of  the two
slaves.
>
>   What happens if we feel a need to add information while the master is down
> ?  Reconfigure that former slave to be a master and then manually reconcile
> the former master when it is available, perhaps ?
>
>   I didn't see anything in the documentation or in the postgres site about
> this (and I looked through the archives for references to dbmirror), so I
> apologize if I am issuing a faq.

While, this might not solve your problem (and dbmirror might have
solution of it's own for this) I would like to point out utility that
I'm working on right now called pgdiff. Since, it's so fresh I still
consider it somewhat experimental. Basically, it allows you to make
a diff of two databases on different hosts and spits out inserts,
selects and updates to sync databases.

Right now it's not clever enough to skip serial colums (or any other
with sequence attached to it), but as I said, I'm working on it (I'm
using it for regression tests on rserv, so it has to be accurate).

http://www.rot13.org/~dpavlin/sql.html

I must warn you that current version is one big perl script, and next
one will use Pg::Scheme module (which is actually a fork of this
command) so you'll have to download more than one file.

--
Dobrica Pavlinusic               2share!2flame            dpavlin@rot13.org
Unix addict. Internet consultant.             http://www.rot13.org/~dpavlin