Hi,
I want to limit the size of the log files since it's going into GB's. I used the option "log_rotation_size = 1024" but the size went much ahead the specified 1MB. The detailed configuration of the postgresql.conf file is as follows:
log_destination = 'stderr'
logging_collector = on
log_directory = 'pg_log'
log_filename = 'postgresql.log'
log_rotation_age = 0
log_rotation_size = 1024
log_min_error_statement = debug5
log_min_duration_statement = 0
All the other flags related to the "ERROR REPORTING AND LOGGING" are commented. In-spite of this configuration (which I think is correct) the log size goes beyond 1MB. Could there be some kind of combination of flags that I am missing. Also following details might be helpful in debugging:
postgres=# select name, setting from pg_settings where name ~ '^log_';
name | setting
-----------------------------+----------------
log_autovacuum_min_duration | -1
log_checkpoints | off
log_connections | off
log_destination | stderr
log_directory | pg_log
log_disconnections | off
log_duration | off
log_error_verbosity | default
log_executor_stats | off
log_filename | postgresql.log
log_hostname | off
log_line_prefix |
log_lock_waits | off
log_min_duration_statement | 0
log_min_error_statement | debug5
log_min_messages | warning
log_parser_stats | off
log_planner_stats | off
log_rotation_age | 0
log_rotation_size | 1024
log_statement | none
log_statement_stats | off
log_temp_files | -1
log_timezone | Asia/Kolkata
log_truncate_on_rotation | off
(25 rows)
Please take a look.