I'm using ArchLinux
and PostgreSQL
9.4.4 and have enabled the logging in the config file:
$ sudo egrep -v "^[[:blank:]]*($|#|//|/\*| \*|\*/)" /var/lib/postgres/data/postgresql.conf
max_connections = 1024 # (change requires restart)
shared_buffers = 128MB # min 128kB
dynamic_shared_memory_type = posix # the default is the first option
logging_collector = on # Enable capturing of stderr and csvlog
log_directory = '/tmp' # directory where log files are written,
log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # log file name pattern,
log_file_mode = 0644 # creation mode for log files,
log_error_verbosity = verbose # terse, default, or verbose messages
log_statement = 'all' # none, ddl, mod, all
log_timezone = 'Asia/Jakarta'
datestyle = 'iso, dmy'
timezone = 'Asia/Jakarta'
lc_messages = 'en_CA.UTF-8' # locale for system error message
lc_monetary = 'en_CA.UTF-8' # locale for monetary formatting
lc_numeric = 'en_CA.UTF-8' # locale for number formatting
lc_time = 'en_CA.UTF-8' # locale for time formatting
default_text_search_config = 'pg_catalog.english'
then restart or reload the service:
sudo systemctl restart postgresql
sudo systemctl reload postgresql
the /tmp
permission:
$ ll /tmp/
total 11656
drwxrwxrwt 22 root root 580 Jun 29 10:05 ./
drwxr-xr-x 17 root root 4096 Jun 10 08:04 ../
...
the /tmp
usage:
$ df | grep /tmp
tmpfs 8159996 31204 8128792 1% /tmp
doing some query on psql
, but the /tmp/postgresql-*
still doesn't show up. What can I do to find which part that prevent log from being created?