Search Postgresql Archives

Re: Pausing log shipping for streaming replication

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

 




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


[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