Re: Pg_basebackup does not do aything - Mailing list pgsql-admin

From Matheus de Oliveira
Subject Re: Pg_basebackup does not do aything
Date
Msg-id CAJghg4LOTYVyKdR2O8rcPx5rDjOhAC9Dz+hK608pS-mG2qNH5w@mail.gmail.com
Whole thread Raw
In response to Re: Pg_basebackup does not do aything  (thomas simon <tsimon@neteven.com>)
Responses Re: Pg_basebackup does not do aything  (John Scalia <jayknowsunix@gmail.com>)
List pgsql-admin

On Wed, Jun 25, 2014 at 7:24 PM, thomas simon <tsimon@neteven.com> wrote:
Yes, it did the trick !
Thanks Matheus


You're welcome. Just know that this may cause some I/O storm if you have many dirty data in your buffer caches.
 
Something I don't understand is how my 2nd slave will be synced to master, because master's archive command only sent WAL files to 1st slave.
Does I have to archive on both slaves ? (is it possible) ?

Streaming Replication (configured by primary_conninfo) does not need to use archives, instead PG uses one dedicated process on each server (wal sender and wal receiver) that sends records of WAL from the sender (a master or another slave in cascading replication scenario) to the receiver.

So, you can, but you don't necessarily *need* to send the archives to the slaves.
 
And what I am supposed to use with parameter "restore_command" ?

It is recommended to configure it to grab archive files from somewhere (can be from other node) if you have archiving enabled. So, if the receiver can't keep up with the sender (e.g. when the WAL files are rotated and the sender does not have the files the receiver wants anymore), it can get the files it need from archiving.
 
In this case, my new slave will not start if i dont start it just after the end of the pg_basebackup ?

Yes. You have to start it after pg_basebackup. It is also recommended to use "-X stream" option for pg_basebackup, it will copy the necessary WAL files to the slave, and so it can start faster. Be aware that you'll need two slots of max_wal_sender to accomplish that (one for the data backup and other for the WAL files).


--
Matheus de Oliveira
Analista de Banco de Dados
Dextra Sistemas - MPS.Br nível F!
www.dextra.com.br/postgres

pgsql-admin by date:

Previous
From: thomas simon
Date:
Subject: Re: Pg_basebackup does not do aything
Next
From: John Scalia
Date:
Subject: Re: Wal archive way behind in streaming replication