Re: Pausing log shipping for streaming replication

From: Sameer Kumar <sameer(dot)kumar(at)ashnik(dot)com>
To: Joseph Kregloh <jkregloh(at)sproutloud(dot)com>
Cc: PostgreSQL General Discussion Forum <pgsql-general(at)postgresql(dot)org>
Subject: Re: Pausing log shipping for streaming replication
Date: 2014-12-17 12:16:35
Message-ID: CADp-Sm43uYKUZk07mCLy6Wyf3vH6k9U3aa3XiWU3dNyFG0b-wA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Dec 16, 2014 at 11:36 PM, Joseph Kregloh <jkregloh(at)sproutloud(dot)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(at)prod-db-slave:archive/$2 < /dev/null;
> rsync -a $1 pgprod(at)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

*[image: icons]*

[image: Email patch] <http://www.ashnik.com/>

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Zuiderhoek, Jeroen 2014-12-17 12:47:41 Building debug version with MSVC 2013 for 64bit: No _d postfix on dll and lib files...
Previous Message Ramesh T 2014-12-17 11:05:17 Re: pg_dump