Search Engine: Elastic
  • Article for your preferred language does not exist. Below is international version of the article.

Article ID: 121028, created on Apr 11, 2014, last review on Nov 18, 2014

  • Applies to:
  • Business Automation 5.5
  • Business Automation 5.4

Question

How to increase PostgreSQL log level so it has all database queries in it?

Resolution

  1. Open PostgreSQL config file (on the database server):

    vi /var/lib/pgsql/data/postgresql.conf
    
  2. Set values for the following variables as specified below:

    log_line_prefix = '[%p] [%c] [%m] [%x]: '
    log_statement = 'all'
    
  3. Reload PostgreSQL configuration:

    bash-4.1$ su postgres
    bash-4.1$ cd /var/lib/pgsql/data/
    bash-4.1$ /usr/bin/pg_ctl -D /var/lib/pgsql/data/ reload
    server signaled
    

Note

  • Paths can slightly differ for different PostgreSQL versions
  • PBA services are not affected, no need to stop PBA
  • PostgreSQL logs will be available at:

    # cd /var/lib/pgsql/data/pg_log/
    # ls
    postgresql-Fri.log  postgresql-Sat.log  postgresql-Thu.log  postgresql-Wed.log
    postgresql-Mon.log  postgresql-Sun.log  postgresql-Tue.log
    

198398b282069eaf2d94a6af87dcb3ff caea8340e2d186a540518d08602aa065 801221f8cd76fba7300d1e6817c8e08b 92711db0799e8aefe8e51f12dace0496 210d017ddc3a076d22f0f865b1cf0730 e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF