Search Engine: Elastic

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

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


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


  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


  • 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 8fc71f07abe5b233fea1ae0377cd5e3d 801221f8cd76fba7300d1e6817c8e08b 92711db0799e8aefe8e51f12dace0496 210d017ddc3a076d22f0f865b1cf0730

Email subscription for changes to this article
Save as PDF