Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pg_log directory for postgresql in ubuntu?

Tags:

postgresql

I followed instruction on http://pydanny-event-notes.readthedocs.org/en/latest/DjangoConEurope2012/10-steps-to-better-postgresql-performance.html

it says to set log_directory = pg_log

where's that directory in ubuntu? :(

like image 202
eugene Avatar asked Dec 24 '15 08:12

eugene


2 Answers

Under postgres data directory something like /var/lib/postgresql/9.3/main/pg_log

like image 72
pmverma Avatar answered Nov 20 '22 02:11

pmverma


The query gives you the actual log directory in any operating system.

select format('%s/%s', 
    current_setting('data_directory'),
    current_setting('log_directory'));
like image 12
klin Avatar answered Nov 20 '22 00:11

klin