Re: Cascade streaming replication + wal_files - Pgsql 9.2

Поиск
Список
Период
Сортировка
От Sameer Kumar
Тема Re: Cascade streaming replication + wal_files - Pgsql 9.2
Дата
Msg-id CADp-Sm6akx6wBmG5N=J2VUTrBNxm8zHWTbA0iKV6vciZtLtAoQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Cascade streaming replication + wal_files - Pgsql 9.2  (Patrick B <patrickbakerbr@gmail.com>)
Ответы Re: Cascade streaming replication + wal_files - Pgsql 9.2  (Patrick B <patrickbakerbr@gmail.com>)
Список pgsql-general


On Thu, 7 Jul 2016, 10:32 a.m. Patrick B, <patrickbakerbr@gmail.com> wrote:
The slave02 server will be a copy of the DB into Amazon. There will be a migration to Amazon in the future, and the company's managers want a copy of the current DB there to test and do all the stuffs they need (migrating to 9.5, too).

Have you checked out Amazon's DMS?


slave01 is already working as a streaming replication server.
The master server sends the wal_files to slave01 by archive_command.

The plan below isn't my idea, I would do different but isn't my call:

Been there :)
 

Current scenario:

master stores wal_files into slave01
slave02 does not exists


The plan is:

1. setup slave02 at amazon EC2 (just for testing and future master server for devs)

Is it EC2 Classic? Or is it EC2 Virtual Pvt Cloud (VPC)?
 
2. setup postgres on slave02 (9.2)
3. pg_basebackup will be run from slave01. This will split the base in files of 50GB each (example)
4. Send the splitted files from slave01 to slave02
5. restore/join the files
6. start postgres on the slave02 slave
7. restore the DB using the wal_files from slave01

Given that slave02 is a standby, how do you plan on doing your regression testing? It will be just a read only database. 

You can restore the wal_file by specifying resotre_command to copy from the archive generated by the master (rsync or scp to pull from your in-premise setup to EC2). This would be fairly simple if you are using VPC

Question:

Is possible to make slave01 archive the wal_files?

If you really can not just live with archive generated on master itself, you need to try the options discussed up thread.
1. Copy the archives generated on master to a shared location or may be copy it to S3 bucket
2. Archive generated on master is rsync (schedule basis) to EC2
3. pg_receivexlog running on EC2 to copy WAL from slave01

can just be a archive_command and archive_mode = on?

Setting these parameters on slave02 will have not any effect. 
--
--
Best Regards
Sameer Kumar | DB Solution Architect 
ASHNIK PTE. LTD.

101 Cecil Street, #11-11 Tong Eng Building, Singapore 069 533

T: +65 6438 3504 | M: +65 8110 0350 | www.ashnik.com

В списке pgsql-general по дате отправления:

Предыдущее
От: Patrick B
Дата:
Сообщение: Re: Cascade streaming replication + wal_files - Pgsql 9.2
Следующее
От: Patrick B
Дата:
Сообщение: Re: Cascade streaming replication + wal_files - Pgsql 9.2