Re: help for this situation - Mailing list pgsql-general

From Albe Laurenz
Subject Re: help for this situation
Date
Msg-id D960CB61B694CF459DCFB4B0128514C20890254E@exadv11.host.magwien.gv.at
Whole thread Raw
In response to help for this situation  (GMAIL <federico.serale@gmail.com>)
List pgsql-general
GMAIL wrote:
> i describe the situation:
> i have two pc with postgressql server:
> - a main pc, with ip 192.168.5.1 turned on
> - a "backup" pc, with ip 192.168.5.1 turned off
>
> i want that the main pc saves the database in local hard drive and on
a
> nas real-time. when the main pc has a failure, i turn on, manually,
the
> secondary pc, that reads the database from the nas
>
> how i can do that?

What do you want to guard against? Hardware outage?
Software bugs?

I don't think that the scenario you describe is possible.

There are other, maybe better ways:

1) Have the database on NAS and use storage mirroring.
   NAS in that case means NFS (hard mount!), *not CIFS*.
   That will help against hardware outage, but not against
   filesystem or database corruption.

2) Use a standby database with streaming replication.
   That will also help with filesystem and database
   corruption.

Yours,
Laurenz Albe


pgsql-general by date:

Previous
From: "Albe Laurenz"
Date:
Subject: Re: Replication - doubts
Next
From: "Albe Laurenz"
Date:
Subject: Re: 9.1/9.2 SERIALIZABLE: expected serialization failure between INSERT and SELECT not encountered