Re: Pausing log shipping for streaming replication

Поиск
Список
Период
Сортировка
От Sameer Kumar
Тема Re: Pausing log shipping for streaming replication
Дата
Msg-id CADp-Sm43uYKUZk07mCLy6Wyf3vH6k9U3aa3XiWU3dNyFG0b-wA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Pausing log shipping for streaming replication  (Joseph Kregloh <jkregloh@sproutloud.com>)
Список pgsql-general

On Tue, Dec 16, 2014 at 11:36 PM, Joseph Kregloh <jkregloh@sproutloud.com> wrote:
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


​Sorry, I read your other posts just now. This seems sane to me.​
 

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'

​Since you are specifying the restore_command and archive (As per my understanding of your situation) is full, should not you start polling the secondary wal archive that you have spcifcied in archive.sh?
 
archive_cleanup_command = 'pg_archivecleanup /usr/local/pgsql/archive/ %r'

I generally don't prefer this since archives are helpful for a PITR as well so I prefer cleaning them up manually.​



Best Regards,

Sameer Kumar | Database Consultant

ASHNIK PTE. LTD.

101 Cecil Street, #11-11 Tong Eng Building, Singapore 069533

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

icons

 

Email patch

 

This email may contain confidential, privileged or copyright material and is solely for the use of the intended recipient(s).

Вложения

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

Предыдущее
От: Vincent Veyron
Дата:
Сообщение: Re: Storing Video's or vedio file in DB.
Следующее
От: Thomas Kellerer
Дата:
Сообщение: Re: Storing Video's or vedio file in DB.