Skip to main content

postgres 로그디렉토리 생성하기

mkdir -p /var/log/pgsql/
chown -R postgres.dba /var/log/pgsql/


vi /usr/local/pgsql/data/postgresql.conf
logging_collector = on
log_destination = 'stderr' 
redirect_stderr = true 
log_directory = '/var/log/pgsql/' 

log_filename = 'pgsql-%Y-%m-%d_%H%M%S.log' 
log_rotation_size = 500MB