Changes between Version 55 and Version 56 of InstallationGuidelines/PostgreSQL
- Timestamp:
- 11/15/11 16:23:01 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
InstallationGuidelines/PostgreSQL
v55 v56 261 261 * http://www.revsys.com/writings/postgresql-performance.html 262 262 * http://www.postgresql.org/docs/8.4/static/runtime-config-logging.html 263 264 Log all queries which take longer than 5s: 265 {{{ 266 vim /etc/rsyslog.conf 267 local0.* /var/log/postgresql.log 268 269 /etc/init.d/rsyslogd restart 270 271 vim /etc/postgresql/8.4/main/postgresql.conf 272 log_destination = 'syslog' 273 syslog_facility = 'LOCAL0' 274 syslog_ident = 'postgres' 275 log_min_duration_statement = 5000 276 277 /etc/init.d/postgresql restart 278 279 tail -n 45 -f /var/log/postgresql.log 280 }}} 281 282 Disable logging again: 283 {{{ 284 vim /etc/postgresql/8.4/main/postgresql.conf 285 log_min_duration_statement = -1 286 287 /etc/init.d/postgresql restart 288 }}} 289 290 291 Log all queries which take longer than 5s & do an 'EXPLAIN' on those queries (not working) 263 292 * 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 postgres268 psql269 set log_min_duration_statement = 5000;270 \q271 272 tail -n 45 -f /var/log/postgresql/postgresql-8.4-main.log273 }}}274 275 Disable logging again:276 {{{277 su postgres278 psql279 set log_min_duration_statement = -1;280 \q281 }}}282 283 Log all queries which take longer than 5s & do an 'EXPLAIN' on those queries (not working)284 293 {{{ 285 294 LOAD 'auto_explain';