9.0 Replication and archive cleanup

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

 



I have a master and slave set up with replication - both xlog and
streaming replication are set up and working great.  The slave keeps
up with the master and is available for read-only queries.

I just configured the archive_cleanup_command in my recovery.conf file
on the slave to use pg_archivecleanup, and restarted the slave.  After
doing so, and confirming that at least 1 new xlog was shipped to the
slave, I am not seeing any evidence of the archivecleanup command
being run.  No files are removed, nor is there anything in the slave's
postgres log output regarding archive cleanup.

This is my recovery.conf:

    standby_mode = 'on'
    primary_conninfo = 'host=<<master-ip-addr>> port=5432
user=<<user>> password=<<pass>>'
    restore_command = 'cp /var/lib/postgresql/replication/db1/wal/%f %p'
    trigger_file = '/var/lib/postgresql/become-master'
    archive_cleanup_command =
'/usr/lib/postgresql/9.0/bin/pg_archivecleanup
/var/lib/postgresql/replication/db1/wal %r'

I am not sure if I have mis-configured things or if I'm not
understanding the relationship between the xlog shipping and streaming
replication.

Is the xlog recovery (and cleanup) not triggered when streaming
replication is enabled?  If that's the case, what is a good strategy
for cleaning these up?


Regards,

Kyle

-- 
Twitter: @kyleburton
Blog: http://asymmetrical-view.com/
Fun: http://snapclean.me/

-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux