Re: WAL logs clog-up disk space

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: WAL logs clog-up disk space
Дата
Msg-id A737B7A37273E048B164557ADEF4A58B17C6D866@ntex2010a.host.magwien.gv.at
обсуждение исходный текст
Ответ на Re: WAL logs clog-up disk space  (James David Smith <james.david.smith@gmail.com>)
Список 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

В списке pgsql-novice по дате отправления:

Предыдущее
От: "Luis E. Arevalo R."
Дата:
Сообщение: Execute query iterating with different parameter values
Следующее
От: "Luis E. Arevalo R."
Дата:
Сообщение: Re: Execute query iterating with different parameter values