Guillaume Lelarge guillaume at lelarge.info
Wed May 14 23:03:24 PDT 2008
Shahaf Abileah a écrit :
> I just read this page: 
> http://www.postgresql.org/docs/8.2/static/continuous-archiving.html
> 
> And it made me wonder whether this mechanism of continuous archiving and 
> point-in-time recovery (PITR) can be used for replication.  In other 
> words, Postgres already generates write-ahead-log files for all 
> operations.  If you can transmit those files to another machine and 
> replay them, continuously, then you have a form of replication.
> 
> But, it’s not clear if this is possible.  The article linked above talks 
> about doing continuous archiving, but it doesn’t talk about doing 
> continuous recovery.  Instead, it talks about doing a single 
> point-in-time recovery.  Moreover, this recovery requires the target 
> (“slave”) machine to be offline during the recovery process.
> 

Continuous recovery is possible, see :
   http://www.postgresql.org/docs/8.2/static/warm-standby.html

But you're right, during the recovery the slave is not available for 
connections.

> Does anyone know whether it’s possible to use Postgres’ archiving and 
> PITR for replication?
> 

Yes, it's called Log Shipping or Warm Server Standby.

> By the way, if it can, it seems that:
> 
> 1.       It would have the advantage that various operations are handled 
> in a more natural manner than with Slony (e.g. DDL)
> 
> 2.       It would have the disadvantage that you can’t be choosy about 
> what to replicate – you get the entire DB cluster, or nothing at all.
> 
> Is that correct?
> 

Yes.

Regards.


-- 
Guillaume.
  http://www.postgresqlfr.org
  http://dalibo.com


More information about the Slony1-general mailing list