Re: How to maintain the csv log files in pg_log directory only forpast 30 days

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: How to maintain the csv log files in pg_log directory only forpast 30 days
Дата
Msg-id 20180928052539.GJ1500@paquier.xyz
обсуждение исходный текст
Ответ на How to maintain the csv log files in pg_log directory only for past30 days  (Raghavendra Rao J S V <raghavendrajsv@gmail.com>)
Ответы Re: How to maintain the csv log files in pg_log directory only forpast 30 days  (Raghavendra Rao J S V <raghavendrajsv@gmail.com>)
Re: How to maintain the csv log files in pg_log directory only forpast 30 days  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
On Fri, Sep 28, 2018 at 10:33:30AM +0530, Raghavendra Rao J S V wrote:
> Log file will be generated in *csv* format at *pg_log* directory in our
> PostgreSQL. Every day we are getting one log file. We would like to
> maintain only max 30 days. Which setting need to modify by us in
> “postgresql.conf” in order to recycle the log files after 30 days.

If you use for example log_filename = 'postgresql-%d.log', then the
server uses one new file every day.  This truncates the contents from
the last month automatically.
--
Michael

Вложения

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

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: Out of Memory
Следующее
От: bhargav kamineni
Дата:
Сообщение: Replication Issues