Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

PostgreSQL Parameters to enable Log for all Queries

A database log is necessary for finding different statuses, errors, bad queries and any changes on the Database Server.
A Database Administrator can also log different executed queries and analyze those for performance tuning.
Following are few relevant parameters for enabling the PostgreSQL log for all the queries.
Please open your postgresql.conf file and make sure about all logs related parameter’s value which are mentioned below.
  • log_directory = ‘pg_log’ (default directory name)
  • log_filename = ‘postgresql-%Y-%m-%d_%H%M%S.log’ (default file name structure)
  • log_statement = ‘all’ (value ‘all’ is recommended {none, ddl, mod, all})
  • logging_collector = ON
  • log_line_prefix = ‘%t %c %u ‘ (time, sessionid, user)
  • log_destination = ON (stderr,syslog,csvlog,eventlog)
  • log_rotation_size = 15MB
  • log_rotation_age = 1d (create new log file every day)

Comments

Popular posts from this blog

VMWARE WORKSTATION 3,4,5,6,7,8,9,10,11,12,14,15...etc LICENSE KEYS COLLECTION

How to Get Table Size, Database Size, Indexes Size, schema Size, Tablespace Size, column Size in PostgreSQL Database

Vertica Database Administration Tools and Management Console

vertica Database installation

How to connect vmware virtual machine server using putty & pgadmin ?