Re: Limiting the no. of logs file generated by postgreSQL
От | David G. Johnston |
---|---|
Тема | Re: Limiting the no. of logs file generated by postgreSQL |
Дата | |
Msg-id | CAKFQuwbOzpf6hT5epFmM0mOfsu8jx7UAVuxTiYa4sW3t7dLJLA@mail.gmail.com обсуждение исходный текст |
Ответ на | Limiting the no. of logs file generated by postgreSQL (merina ghoghwani <merinaghoghwani@gmail.com>) |
Ответы |
Re: Limiting the no. of logs file generated by postgreSQL
|
Список | pgsql-admin |
Hi All,I am currently using PostgreSQL 9.4.5.
Not that it changes the answer here but you are considerably out-of-date and should upgrade to 9.4.16 as the earliest opportunity.
What I've observed is,1. I get a new file after every 10 Mins or when I restart the service or logs size is over 10KB.But, it doesn't solve my problem to reduce the size of postgres logs, as the file is not rotated, but a new is created every time.Is there any way I can rotate the files or restrict number to, say max 5 fileslike,
The docs cover what can and cannot be done. My reading indicates that what you described cannot be done - since you want to key off of size instead of time.
My conclusion is that you need to turn over log file management to an external utility - syslog, logrotate, etc..., that provides the feature you desire.
David J.
В списке pgsql-admin по дате отправления: