Re: Can we limit the total size of WAL?

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: FattahRozzaq <ssoorruu(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-cluster-hackers(at)postgresql(dot)org>
Subject: Re: Can we limit the total size of WAL?
Date: 2015-09-09 06:52:55
Message-ID: CAB7nPqTktz9Y5ubAi4Lk4b0QwfaB2b5gfS_cY5OW-PCEoTqqzA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-cluster-hackers

On Wed, Sep 9, 2015 at 3:41 PM, FattahRozzaq <ssoorruu(at)gmail(dot)com> wrote:
> The archive_command that was generated by Postgres-XL in postgresql.conf was:

When using Postgres-XL, I guess that asking directly the XL guys is
more appropriate than here, but well your question does apply to
Postgres as well...

> But if I check the total size of the archive folder in datanode slave,
> it contains 90GB, each file has 16MB size, with total files 5749:
> # du -sh /home/postgres/PGXL/nodes/datanodearchlog/03/
> 90G /home/postgres/PGXL/nodes/datanodearchlog/03/
> # ls -al /home/postgres/PGXL/nodes/datanodearchlog/03/ | grep 16777216 | wc -l
> 5749

Normally standbys don't do archiving (Except in 9.5~ but XL has just
synced up with it). So I am not really following. Aren't those files
generated and archived by a master datanode?

> How to limit the amount of files generated by WAL archiving?
> Or maybe if we can, how to recycle the files generated by WAL archiving?

pg_archivecleanup [1] is one method by setting up
archive_cleanup_command in the recovery.conf file of the involved
standby. Now be careful of two things:
1) Is another standby node in need of those files? Be careful to not
cleanup an archive folder when multiple nodes fetch from it.
2) Do you expect a set of base backups to need those files or not?

[1]: http://www.postgresql.org/docs/devel/static/pgarchivecleanup.html
Regards,
--
Michael

In response to

Browse pgsql-cluster-hackers by date

  From Date Subject
Next Message lacesco 2015-09-18 06:04:24 Fw: important message
Previous Message FattahRozzaq 2015-09-09 06:41:22 Can we limit the total size of WAL?