pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Xavier 12 <maniatux@gmail.com>
To: Venkata Balaji N <nag1010@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: pg_xlog on a hot_stanby slave
Date: Wed, 17 Jun 2015 09:21:40 +0200
Message-ID: <55812004.3090604@gmail.com> (raw)
In-Reply-To: <CAEyp7J_DSXZ-e9-FkjDEN0hPpt+su1+kbPCmdvc7FEHYFqgU_g@mail.gmail.com>
References: <CAMOV8iB3oRzC4f7UTzOwC2wT08do3voi+PGN07uJq+ayo9E=cQ@mail.gmail.com>
	<CAEyp7J_DSXZ-e9-FkjDEN0hPpt+su1+kbPCmdvc7FEHYFqgU_g@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>



On 17/06/2015 02:44, Venkata Balaji N wrote:
> On Tue, Jun 16, 2015 at 6:55 PM, Xavier 12 <maniatux@gmail.com 
> <mailto:maniatux@gmail.com>> wrote:
>
>     Hi everyone,
>
>     Questions about pg_xlogs again...
>     I have two Postgresql 9.1 servers in a master/slave stream replication
>     (hot_standby).
>
>     Psql01 (master) is backuped with Barman and pg_xlogs is correctly
>     purged (archive_command is used).
>
>     Hower, Psql02 (slave) has a huge pg_xlog (951 files, 15G for 7 days
>     only, it keeps growing up until disk space is full). I have found
>     documentation and tutorials, mailing list, but I don't know what is
>     suitable for a Slave. Leads I've found :
>
>     - checkpoints
>     - archive_command
>     - archive_cleanup
>
>     Master postgresq.conf :
>
>     [...]
>     wal_level = 'hot_standby'
>     archive_mode = on
>     archive_command = 'rsync -az /var/lib/postgresql/9.1/main/pg_xlog/%f
>     barman@nas.lan:/data/pgbarman/psql01/incoming/%f'
>     max_wal_senders = 5
>     wal_keep_segments = 64
>     autovacuum = on
>
>     Slave postgresql.conf :
>
>     [...]
>     wal_level = minimal
>     wal_keep_segments = 32
>     hot_standby = on
>
>     Slave recovery.conf :
>
>     standby_mode = 'on'
>     primary_conninfo = 'host=10.0.0.1 port=5400 user=postgres'
>     trigger_file = '/var/lib/postgresql/9.1/triggersql'
>     restore_command='cp /var/lib/postgresql/9.1/wal_archive/%f "%p"'
>     archive_cleanup_command =
>     '/usr/lib/postgresql/9.1/bin/pg_archivecleanup
>     /var/lib/postgresql/9.1/wal_archive/ %r'
>
>
>     How can I reduce the number of WAL files on the hot_stanby slave ?
>
>
> If the number of WAL files in pg_xlog are growing, then you need to 
> look at why the files are not getting deleted.
>
> Do you see master and standby in sync ? You can check that by getting 
> the current pg_xlog position in standby.
>
> Regards,
> Venkata Balaji N
>
> Fujitsu Australia
>
>
>

I have a Zabbix check for pg_xlog in master/slave indeed.

Xavier C.

view thread (15+ messages)  latest in thread

Message-ID: <55812004.3090604@gmail.com>
Permalink:  ../55812004.3090604@gmail.com/
Also on:    postgresql.org/message-id/55812004.3090604@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: maniatux@gmail.com, nag1010@gmail.com, pgsql-general@postgresql.org
  Subject: Re: pg_xlog on a hot_stanby slave
  In-Reply-To: <55812004.3090604@gmail.com>
  References: <CAMOV8iB3oRzC4f7UTzOwC2wT08do3voi+PGN07uJq+ayo9E=cQ@mail.gmail.com> <CAEyp7J_DSXZ-e9-FkjDEN0hPpt+su1+kbPCmdvc7FEHYFqgU_g@mail.gmail.com> <55812004.3090604@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox