Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ PostgreSQL log classification and management     - DRBD-based installation and configuration of CentOS 6.5 (Server)

- Linux command -nohup & (Linux)

- Text editing and viewing text Linux command (Linux)

- Teach you self-built Linux firewall free (Linux)

- Linux character device - automatically creates the device nodes and devices (Linux)

- Heartbeat cluster components Overview (Server)

- Getting the Linux shell flow control statements (Programming)

- CentOS 6.5 Linux System Customization and Packaging Quick Implementation Script (Linux)

- EXP-00091 Error resolved (Database)

- Detailed Linux su command to switch users Mistakes (Linux)

- Linux Crontab Timing task command Detailed (Linux)

- Efficient running Linux virtual machine Six Tips (Linux)

- Installation and deployment of MariaDB under CentOS (Database)

- The formatted Linux hard drive and mount (Linux)

- Java List add duplicate the same object (Programming)

- Ubuntu firewall installation and configuration (Linux)

- Java Concurrency -volatile keywords (Programming)

- Python KNN algorithm of actual realization (Programming)

- Linux installation notes under GAMIT (Linux)

- Eclipse, Tomcat configuration JNDI connection Oracle data source example (Server)

 
         
  PostgreSQL log classification and management
     
  Add Date : 2018-11-21      
         
         
         
  PostgreSQL has three kinds of logs are pg_log (database running log), pg_xlog (WAL log, that redo logs), pg_clog (transaction commit log record of the transaction metadata)

pg_log is off by default, need to set the parameters to enable this log. pg_xlog and pg_clog are forced open, not close.

1. Enable and configure logging parameters pg_log
log_destination = 'csvlog'
  logging_collector = on
  log_directory = 'pg_log'
  log_filename = 'postgresql-% Y-% m-% d_% H% M% S.log'
  log_rotation_age = 1d
  log_rotation_size = 100MB
  log_min_messages = info
  # Record slow SQL execution
  log_min_duration_statement = 60
  log_checkpoints = on
  log_connections = on
  log_disconnections = on
  log_duration = on
  log_line_prefix = '% m'
  # Monitoring database long locks
log_lock_waits = on
  # Record DDL operations
log_statement = 'ddl'

2. Restart PostgreSQL to see the newly generated log $ PGDATA / pg_log / under.
pg_ctl restart -m fast
     
         
         
         
  More:      
 
- Linux redirection and piping (Linux)
- Ubuntu 12.04 install RTL8723BE wireless network card driver (Programming)
- Android WebView use layman (Programming)
- Python Basics Tutorial - lambda keyword (Programming)
- Python KNN algorithm of actual realization (Programming)
- Linux Mint under tty.js Installation Guide (Linux)
- Thrift 0.9.3 compiler installation under Ubuntu (Linux)
- Linux Network Programming - raw socket instance: MAC header message analysis (Programming)
- Use SVN to automatically deploy code under Apache (Server)
- GitHub multiplayer co-development configuration (Linux)
- Linux system started to learn: how to view the Linux thread of a process (Linux)
- MySQL multi-master multi-cluster deployment uses alive Galera (Database)
- wget command examples (Linux)
- Use ARChon runtime environment to run Android apps on Ubuntu (Linux)
- Linux Command-line MySQL summary (Database)
- OpenGL shadow map (Programming)
- Install FFmpeg compiling from source in Mac OS X environment (Linux)
- TCP network communication Java Programming (Programming)
- CentOS7 installed MySQL (Database)
- JavaScript: understanding regular expressions (Programming)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.