From: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
---|---|
To: | "James David Smith *EXTERN*" <james(dot)david(dot)smith(at)gmail(dot)com> |
Cc: | "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: WAL logs clog-up disk space |
Date: | 2013-11-29 13:11:38 |
Message-ID: | A737B7A37273E048B164557ADEF4A58B17C6D866@ntex2010a.host.magwien.gv.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
James David Smith wrote:
>>> 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'
[...]
>>> Could someone suggest a more permanent solution instead please? Is
>>> there a better way to configure this?
>> Yes, there are several ways.
>>
>> First, do you need to be able to restore the database to any given
>> point in the past?
> No. Although a certain amount of time in the past would be useful.
> Maybe 2-3 days if that is possible?
I am afraid that I have been imprecise in my reply.
I meant "any given point in time after the end of your oldest
backup".
You see, if you do your backups with pg_dump or pg_dumpall,
you can restore the database only to the exact points in time
when you took these backups.
If you need to be able to restore your database to a state
between two backups, you will have to use a different technology
(http://www.postgresql.org/docs/9.3/static/continuous-archiving.html)
>> If not, and you do your backups with pg_dump, you can simply
>> set archive_mode=off and restart the database.
> Yes, we could do this. I know how to use pg_dump so we could automate
> that I guess.
I suggest that you go with the simplest solution that fulfills your
requirements, so if you don't need point-in-time-recovery and your
databases are not large, pg_dump might be the best for you.
Yours,
Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | Luis E. Arevalo R. | 2013-11-29 13:16:47 | Re: Execute query iterating with different parameter values |
Previous Message | Luis E. Arevalo R. | 2013-11-29 13:11:33 | Execute query iterating with different parameter values |