Search Postgresql Archives

Re: WAL archive on slave

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



James Sewell wrote:
> My understanding is that WAL archiving can not be enabled on the slave in a streaming replication
> pair.

It can be enabled.  Did you try it?

> If this is correct, is there a reason behind it? I can see logs showing up in pg_xlog, so could they
> not be archived?

These are files containing the WAL data replicated from the master.
They won't be archived.

> The reason I ask is if this happened it would allow the following with a streaming replication pair
> (A,B):
> 
> 
> 1.	Start A as master
> 2.	Attach B as slave using basebackup
> 3.	work ....
> 4.	Promote B to master
> 
> 5.	Restore A from a scheduled backup to a time before promotion
> 6.	Attach A as slave pointing at B's WAL archive
> 
> If we used A's WAL archive in this case and A had writes after the promotion then we would get
> timeline errors.

You shouldn't with 9.3, because in that case A would follow the
timeline switch introduced by B's promotion rather than its old timelime.
http://www.postgresql.org/message-id/E1TjCRc-00084r-1H@xxxxxxxxxxxxxxxxxxxxxx

I may be missing something there since I have never tried it.

> As far as I can tell, using the WAL archive from B would resolve this issue.

That should work in any event.

Yours,
Laurenz Albe

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux