Re: Pausing log shipping for streaming replication

Поиск
Список
Период
Сортировка
От Joseph Kregloh
Тема Re: Pausing log shipping for streaming replication
Дата
Msg-id CAAW2xfcgy0J0gxmRWZDrB+01Y95X9esq-2oA=q46H+sYPbXp3A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Pausing log shipping for streaming replication  (Sameer Kumar <sameer.kumar@ashnik.com>)
Ответы Re: Pausing log shipping for streaming replication
Список pgsql-general


On Mon, Dec 15, 2014 at 7:12 PM, Sameer Kumar <sameer.kumar@ashnik.com> wrote:


On 16 Dec 2014 01:13, "Joseph Kregloh" <jkregloh@sproutloud.com> wrote:
>
> Hello,
>
> I have a master multi slave streaming replication setup. One master and two slaves. I need to do some maintenance on one of the slaves as one of the drives died however there is some other weird things going on in that array that I would need to investigate. So I am expecting the machine to be down at least two hours.
>
> I remember reading that if a master cannot connect to the slave it would hold the log file from shipping. Is there any other way to hold the file until the slave comes back online? Would it affect both slaves not getting their files shipped over?
>
> The good thing is that the slave in question is not serving any connections.
>
> From what I remember emptying out the archive_command would pause log shipping. Can the same be done by issuing a pg_stop_backup()?

Are you using streaming replication or log shipping? I believe both are different. Can you share you archive_command and recovery.conf content?

 Streaming replication.

archive_command:
archive_command = '/usr/local/pgsql/data/log_shipper.sh "%p" "%f"'

log_shipper.sh
#!/usr/local/bin/bash
rsync -a $1 pgprod@prod-db-slave:archive/$2 < /dev/null;
rsync -a $1 pgprod@prod-db-slave:p3_wal_files/$2 < /dev/null; # Temp storage for WAL files

recovery.conf
standby_mode = 'on'
primary_conninfo = 'host=prod-db port=5434 user=USER password=PW'
trigger_file = '/tmp/pgsql_prod_db.trigger'
restore_command = 'cp -f /usr/local/pgsql/archive/%f %p < /dev/null'
archive_cleanup_command = 'pg_archivecleanup /usr/local/pgsql/archive/ %r'

>
> Thanks,
> -Joseph Kregloh


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Full text search prefix matching
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: pg_dump