After editing postgresql.conf
file and restarting a server it seems that all changes do not apply.
I was following this tutorial:
https://dba.stackexchange.com/questions/153904/pgadmin-4-server-status-view-log-file?newreg=9500cbcc4a794d2fbfd6ef5bb787e0e5
To create .csv
log files for postgresql database. In PGAdmin 4 I've run
SELECT sourcefile FROM pg_settings
and
SHOW config_file
that showed me path of conf file: /etc/postgresql/10/main/postgresql.conf
I've located and edited that file on my Debian server through midnight commander and changed lines:
log_destination='csvlog'
logging_collector='on'
log_directory ='log'
log_filename='postgresql.log'
And then I've restarted the server
sudo service postgresql restart
And now I have problems. I can't find .csv
logs that are supposed to be saved on a server in 'log
' directory. There is no such directory in /etc/postgresql/10/main
or var/lib/postgresql/10/main
. The only logs I could have found were on var/log/posgresql, but there aren't any .csv
files I was searching for. Also I'm not sure if any of my edits in postgresql.conf
file are even working, because I checked the setting from pgAdmin and thats what I got:
SHOW log_destination
stderr
SHOW logging_collector
off
So it looks like settings from postgresql.conf
are not properly applied. How to properly set .csv
logs for postgresql and where they can be found?