Обсуждение: Backup Postgre server

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

Backup Postgre server

От
AnthonyV
Дата:
Hello,

I have a pg8.3 server (an 8.4 upgrade is scheduled) on Windows.
I would like an other pg server in backup in case of hardware problem
on my first server.

I use read/write queries and I would like the second pg become master
without any human intervention.

I saw Slony, but it seems that the backup server is a read-only server
which is not good for me.
I also saw pgpool. Is it a good solution for me? Does it work alone or
with Slony? Is a Windows version exist?

Finally, I saw others products like pgcluster or Bucardo, but I don't
understand the differences between all those products...

Can somebody help me? :)

Thanks in advance

Re: Backup Postgre server

От
David Fetter
Дата:
On Mon, Nov 23, 2009 at 03:19:17AM -0800, AnthonyV wrote:
> Hello,
>
> I have a pg8.3 server (an 8.4 upgrade is scheduled) on Windows.  I
> would like an other pg server in backup in case of hardware problem
> on my first server.
>
> I use read/write queries and I would like the second pg become
> master

This part can be done if you separate the read queries from the ones
that write and/or must be current as of the most recent commit on the
master.  Slony works for doing a manual failover.

> without any human intervention.

This part is generally a very bad idea.  What happens if there is a
bug in the crash detection system?  In broad generality, a sensor
attached directly to an actuator is a booby trap, and this case is no
exception.

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

Re: Backup Postgre server

От
Filip Rembiałkowski
Дата:
2009/11/23 AnthonyV <avequeau@gmail.com>:
> Hello,
>
> I have a pg8.3 server (an 8.4 upgrade is scheduled) on Windows.
> I would like an other pg server in backup in case of hardware problem
> on my first server.
>
> I use read/write queries and I would like the second pg become master
> without any human intervention.

ugh. risky (see David's post)

>
> I saw Slony, but it seems that the backup server is a read-only server
> which is not good for me.

hmm, half-true.
with slony-I, the slave server is read only as long as the replication
is taking place.
when you detect that your master server is dead, you can issue a
FAILOVER and the slave will be fully operational (R/W).
see  http://slony.info/documentation/failover.html

> I also saw pgpool. Is it a good solution for me? Does it work alone or
> with Slony? Is a Windows version exist?

Pgpool can work alone (in so-called replication mode), but it has some
important limitations (volatile functions).
Is it good for you? depends on your db usage patterns (what types of
queries are used)

AFAIK, most real world postgres clustering setups use a combination of
a load balancer (eg pgpool) and replication tool (eg Slony-I)

>
> Finally, I saw others products like pgcluster or Bucardo, but I don't
> understand the differences between all those products...
>

pgcluster is (at best) and early beta.
bucardo is similar to slony but claims to be asynchronous multi master
(not sure how it's possible :-)

did you see http://wiki.postgresql.org/wiki/Replication,_Clustering,_and_Connection_Pooling
?

did you see http://www.postgresql.org/docs/8.4/static/continuous-archiving.html
?

cheers,


--
Filip Rembiałkowski
JID,mailto:filip.rembialkowski@gmail.com
http://filip.rembialkowski.net/

Re: Backup Postgre server

От
AnthonyV
Дата:
On 23 nov, 13:20, plk.zu...@gmail.com (Filip Rembiałkowski) wrote:
> 2009/11/23 AnthonyV <avequ...@gmail.com>:
>
> > Hello,
>
> > I have a pg8.3 server (an 8.4 upgrade is scheduled) on Windows.
> > I would like an other pg server in backup in case of hardware problem
> > on my first server.
>
> > I use read/write queries and I would like the second pg become master
> > without any human intervention.
>
> ugh. risky (see David's post)
>
>
>
> > I saw Slony, but it seems that the backup server is a read-only server
> > which is not good for me.
>
> hmm, half-true.
> with slony-I, the slave server is read only as long as the replication
> is taking place.
> when you detect that your master server is dead, you can issue a
> FAILOVER and the slave will be fully operational (R/W).
> see  http://slony.info/documentation/failover.html
>
> > I also saw pgpool. Is it a good solution for me? Does it work alone or
> > with Slony? Is a Windows version exist?
>
> Pgpool can work alone (in so-called replication mode), but it has some
> important limitations (volatile functions).
> Is it good for you? depends on your db usage patterns (what types of
> queries are used)
>
> AFAIK, most real world postgres clustering setups use a combination of
> a load balancer (eg pgpool) and replication tool (eg Slony-I)
>
>
>
> > Finally, I saw others products like pgcluster or Bucardo, but I don't
> > understand the differences between all those products...
>
> pgcluster is (at best) and early beta.
> bucardo is similar to slony but claims to be asynchronous multi master
> (not sure how it's possible :-)
>
> did you seehttp://wiki.postgresql.org/wiki/Replication,_Clustering,_and_Connecti...
> ?
>
> did you seehttp://www.postgresql.org/docs/8.4/static/continuous-archiving.html
> ?
>
> cheers,
>
> --
> Filip Rembiałkowski
> JID,mailto:filip.rembialkow...@gmail.comhttp://filip.rembialkowski.net/
>
> --
> Sent via pgsql-general mailing list (pgsql-gene...@postgresql.org)
> To make changes to your subscription:http://www.postgresql.org/mailpref/pgsql-general


Thank you for your advices and your reactivity.
I'll try to use Slony-I.

Once again thank you.