WAL logs clog-up disk space

From: James David Smith <james(dot)david(dot)smith(at)gmail(dot)com>
To: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: WAL logs clog-up disk space
Date: 2013-11-27 14:10:18
Message-ID: CAMu32ADius2PbhXGRbVKDaKru3XJqqKwinfNiXXsZ5hcj8kiPQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi there,

I'm currently using a PostgreSQL 9.0 installation on a CentOS 5 linux
machine. I'm not the administrator of the machine, however the person
that is doesn't know very much about PostgreSQL unfortunately. So I'm
trying to work with them to sort out a problem I'm having. What seems
to be the problem, is that periodically, a folder where some WAL logs
are stored gets full i.e. the disk partition runs out of space. I've
looked into the pg_conf file and have found this:

archive_mode = on
archive_command = 'cp %p /var/lib/pgsql/9.0/data/pg_wal/%f'

The folder 'var' is on a partition with about 20GB of space. Once
every few weeks or so, this gets full, and I can't use PostgreSQL. The
administrator then runs something like the below to clean the folder
out:

pg_archivecleanup -d /var/lib/pgsql/9.0/data/pg_wal
000000010000001600000016.00000017.backup

Could someone suggest a more permanent solution instead please? Is
there a better way to configure this?

In the meantime we have changed the code in the pg_conf to below:

archive_mode = on
archive_command = 'cp %p /home/userdb/pg_wal/%f'

This saves the files to a much larger area of the disk. But it's more
of a band-aid than a solution clearly.

Thanks

James

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Albe Laurenz 2013-11-27 15:18:42 Re: WAL logs clog-up disk space
Previous Message Thomas Kellerer 2013-11-27 09:28:58 Re: Duplicate values when using same sequence to generate columns across two different tables