Changes between Version 55 and Version 56 of InstallationGuidelines/PostgreSQL


Ignore:
Timestamp:
11/15/11 16:23:01 (13 years ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • InstallationGuidelines/PostgreSQL

    v55 v56  
    261261 * http://www.revsys.com/writings/postgresql-performance.html
    262262 * http://www.postgresql.org/docs/8.4/static/runtime-config-logging.html
     263
     264Log all queries which take longer than 5s:
     265{{{
     266vim /etc/rsyslog.conf
     267local0.*    /var/log/postgresql.log
     268
     269/etc/init.d/rsyslogd restart
     270
     271vim /etc/postgresql/8.4/main/postgresql.conf
     272log_destination = 'syslog'
     273syslog_facility = 'LOCAL0'
     274syslog_ident = 'postgres'
     275log_min_duration_statement = 5000
     276
     277/etc/init.d/postgresql restart
     278
     279tail -n 45 -f /var/log/postgresql.log
     280}}}
     281
     282Disable logging again:
     283{{{
     284vim /etc/postgresql/8.4/main/postgresql.conf
     285log_min_duration_statement = -1
     286
     287/etc/init.d/postgresql restart
     288}}}
     289
     290
     291Log all queries which take longer than 5s & do an 'EXPLAIN' on those queries (not working)
    263292 * http://www.depesz.com/index.php/2008/11/23/waiting-for-84-auto-explain/
    264 
    265 Log all queries which take longer than 5s:
    266 {{{
    267 su postgres
    268 psql
    269 set log_min_duration_statement = 5000;
    270 \q
    271 
    272 tail -n 45 -f /var/log/postgresql/postgresql-8.4-main.log
    273 }}}
    274 
    275 Disable logging again:
    276 {{{
    277 su postgres
    278 psql
    279 set log_min_duration_statement = -1;
    280 \q
    281 }}}
    282 
    283 Log all queries which take longer than 5s & do an 'EXPLAIN' on those queries (not working)
    284293{{{
    285294LOAD 'auto_explain';