0

I have fixed size limit in logrotation 1M. The script run on every hours even though its rotating less than 1Mb files. I dont know what i have done wrong. Below is my configuration parameters.

/opt/PostgreSQL/8.4/data/pg_log/postgresql-* 
{
              rotate 25
              size=1M
              notifempty
              missingok
              olddir /opt/PostgreSQL/8.4/data/pg_log/test
              copytruncate
}

Please can anyone help me out in this problem?

Lot of Thanks in advance.

sleske
  • 10,009
  • 4
  • 34
  • 44
sathish
  • 1
  • 2

2 Answers2

1

It should be size 1M without equal sign.

AlexD
  • 8,747
  • 2
  • 29
  • 38
  • Even I tried that then also its rotating the less than 1mb files..!!! – sathish Jun 20 '11 at 12:43
  • 1
    This is wrong. With and without the equals sign are both valid and equivalent syntax. See, for example, [this man page](http://linuxcommand.org/man_pages/logrotate8.html) which includes both syntaxes. I am using the equals sign in a logrotate file for Apache in production and it works just fine. – Mark Amery Oct 23 '14 at 09:10
1

You may check the logging parameters in your PostgreSQL config, see: PostgreSQL Error Reporting and Logging (e.g. log_rotation_size).

desasteralex
  • 968
  • 4
  • 5