pg_xlog growth on slave with streaming replication

From: Mike Roest <mike(dot)roest(at)replicon(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: pg_xlog growth on slave with streaming replication
Date: 2012-08-07 13:08:24
Message-ID: CAE7ByhgTJ6xOe4f3aa42Kn0_5gfEzWW1FZ9QQqsC6RP-Fnh_ow@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hey Everyone,
I've got a bit of an interesting issue going on with pg_xlog growing on
a streaming replication slave.

We're running postgres 9.1.1 x64 built from source on Centos 5.8 x64.

On both the master and the slave we have wal_keep_segments configured for
1000
wal_keep_segments = 1000

This config appears to be working 100% on the master as it consistently has
the 1000 files and approx 17 gigs of storage usage.

However on the slave currently we have 4113 wal segments and growing (this
is in data/pg_xlog). The slave has been up and syncing for about 10 days
give or take.

As far as I can tell using the pg_current_xlog_location() and
pg_last_xlog_replay_location() the slave is correctly in sync.

Looking at the recovery.conf I'm seeing that we don't have
archive_cleanup_command defined but looking at the example it seems to be
talking about incoming WAL locations for log shipping and doesn't appear to
talk about the actual pg_xlog directory.

Is the correct solution here as easy as setting up
archive_cleanup_command='pg_archivecleanup /db/data/pg_xlog %r'?

Thanks

Browse pgsql-general by date

  From Date Subject
Next Message Samba 2012-08-07 13:15:16 Re: warnings about invalid "search_path"
Previous Message Magnus Hagander 2012-08-07 13:00:10 Re: Where is diskchecker.pl ?