Aproveitando a dúvida do colega aí, também tenho um problema no log. Tenho uma partição no disco que é somente para o log do postgres, uma partição de 2GB, no entanto, gostaria de fazer com que quando essa partição encher de log, que se auto limpe automaticamente, ou recicle os arquivos mais antigos. Já ví algumas configurações por aí e nenhuma funciona.
*Versão do postgres:* *PostgreSQL 9.3.13 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu 4.8.4-2ubuntu1~14.04.1) 4.8.4, 64-bit* *E configurações de log* *# "postgres -c log_connections=on". Some parameters can be changed at run time#checkpoint_segments = 3 # in logfile segments, min 1, 16MB eachcheckpoint_segments = 16 #64 # in logfile segments, min 1, 16MB each#archive_command = '' # command to use to archive a logfile segment#archive_timeout = 0 # force a logfile segment switch after thiswal_keep_segments = 20 # in logfile segments, 16MB each; 0 disableslog_destination = 'stderr' # Valid values are combinations of # stderr, csvlog, syslog, and eventlog, # depending on platform. csvlog # requires logging_collector to be on.# This is used when logging to stderr:logging_collector = on # Enable capturing of stderr and csvlog # into log files. Required to be on for # csvlogs.# These are only used if logging_collector is on:log_directory = 'pg_log' # directory where log files are written,#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern,log_filename = 'postgresql-%d-%m-%Y.log' # log file name pattern,#log_file_mode = 0600 # creation mode for log files,log_truncate_on_rotation = on # If on, an existing log file with the # same name as the new log file will belog_rotation_age = 1d # Automatic rotation of logfiles willlog_rotation_size = 10MB # Automatic rotation of logfiles will # happen after that much log output.# These are relevant when logging to syslog:#syslog_facility = 'LOCAL0'#syslog_ident = 'postgres'# This is only relevant when logging to eventlog (win32): # loglog_min_messages = warning # values in order of decreasing detail: # loglog_min_error_statement = error # values in order of decreasing detail: # loglog_min_duration_statement = 3000 # -1 is disabled, 0 logs all statements # and their durations, > 0 logs onlylog_checkpoints = onlog_connections = onlog_disconnections = onlog_duration = offlog_error_verbosity = verbose # terse, default, or verbose messageslog_hostname = onlog_line_prefix = '%t [%p]: [%l-1] user=%u,db=%d ' # special values:log_lock_waits = on # log lock waits >= deadlock_timeoutlog_statement = 'none' # none, ddl, mod, alllog_temp_files = 0 # log temporary files equal or larger # -1 disables, 0 logs all temp fileslog_timezone = 'localtime'#log_parser_stats = off#log_planner_stats = off#log_executor_stats = off#log_statement_stats = off#log_autovacuum_min_duration = -1 # -1 disables, 0 logs all actions and # their durations, > 0 logs onlydefault_text_search_config = 'pg_catalog.portuguese'* ################################################################## Desde já obrigado pela ajuda. Diógenes V. Bittencourt
_______________________________________________ pgbr-geral mailing list [email protected] https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
