Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Database \ PostgreSQL log classification and management     - Oracle Linux 5.5 (64bit) Install Oracle 11gR2 RAC detailed tutorial (Database)

- To update Python version under CentOS system (Linux)

- Use lsof restore accidentally deleted log files or database (Linux)

- How to use Android Studio to play more package names APK (Programming)

- Linux disk partition batch format mount script (Linux)

- CentOS 7.0 local address and configure yum source address priority (Linux)

- Ubuntu 14.04 Enable root and disable the guest (Linux)

- ARP spoofing prevent Linux environment LAN (Linux)

- MongoDB collection data migration to MySQL database (Database)

- Handle large data problems Bit-map method (Programming)

- A new method for Linux hidden files (Linux)

- The most common and most effective security settings under linux (Linux)

- Linux operating system security settings initial understanding (Linux)

- Monitor log file (listener.log) (Database)

- Sshuttle A VPN-based transparent proxy that uses ssh (Server)

- Using Linux stat command to view the files (Linux)

- Oracle 12c detailing the new features (Database)

- Help you make Git Bisect (Linux)

- You really do need to know a variety of programming languages (Programming)

- Workaround CentOS error message during compilation PHP5 common (Linux)

  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
- Netfilter / Iptables Comments (Linux)
- Top 10: HTML5, JavaScript 3D game engine and framework (Linux)
- Ubuntu 15.04 installed JDK and configured as the default JDK (Linux)
- Ubuntu 14.10 splash screen brightness settings (Linux)
- To install the Ubuntu Touch emulator on Ubuntu (Linux)
- How UTorrent download the ISO image from the command line (Linux)
- The FreeBSD zfs: failed with error 6 Error Resolution (Linux)
- Can not empty the Recycle Bin to repair problems in Ubuntu 14.04 (Linux)
- Oracle View Object Information (Database)
- Ubuntu 14.04 installed VirtualBox 4.3 appears vboxdrv: Unknown symbol mcount (Linux)
- Classical sorting algorithm - Selection Sort (Linux)
- Tune in high resolution to 1280x800 in Fedora 14 (Linux)
- PostgreSQL Stream Configuration (Database)
- CentOS6.0 successful installation and configuration OpenCV (Linux)
- grep command Series: grep command to search for multiple words (Linux)
- Ubuntu 14.04 LTS to compile the source code Android4.4.2 (Linux)
- CentOS / Linux SELinux Close (Linux)
- Deploy Apache Spark cluster environment in Ubuntu (Server)
- Kernel compile under Debian (Linux)
- GAMIT 10.50 installed in Ubuntu 12.04 system (Linux)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.