pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Claus Guttesen <kometen@gmail.com>
To: System/IJS - Joko <system@ijs.co.id>
Cc: pgsql-performance@postgresql.org
Subject: Re: log_statement at postgres.conf
Date: Thu, 17 Jul 2008 11:29:23 +0200
Message-ID: <b41c75520807170229x7768f6d3u68fb6369bafea270@mail.gmail.com> (raw)
In-Reply-To: <01a601c8e7e9$41ad45d0$12068cc0@edp03>
References: <01a601c8e7e9$41ad45d0$12068cc0@edp03>

> After setting log_statement='all' at postgres.conf,
> then i'm rebooting OS [freeBSD or CentOS],
> i can't find where log file created from log_statement='all' located...
> FYI, location of postgres.conf at /var/lib/pgsql/data/postgres.conf
>
> many thanks..

I added the following to FreeBSD:

/etc/newsyslog.conf:
/var/log/postgresql                     600  7     *    @T00  JC

/etc/syslog.conf:
local0.*                                        /var/log/postgresql

/usr/local/pgsql/data/postgresql.conf:
log_destination = 'syslog'
syslog_facility = 'LOCAL0'
syslog_ident = 'postgres'
log_min_duration_statement = 100        # -1 is disabled, 0 logs all
statements, in ms.

Remember to touch /var/log/postgresql before restarting syslogd (kill
-HUP syslog-pid). Chmod 0700 so only root can read the log-file.
Adjust log_min_duration_statement to your needs.

I found this recipe somewhere, but don't remember where so I can't
give credit to the that person.

-- 
regards
Claus

When lenity and cruelty play for a kingdom,
the gentlest gamester is the soonest winner.

Shakespeare



view thread (7+ messages)  latest in thread

Message-ID: <b41c75520807170229x7768f6d3u68fb6369bafea270@mail.gmail.com>
Permalink:  ../b41c75520807170229x7768f6d3u68fb6369bafea270@mail.gmail.com/
Also on:    postgresql.org/message-id/b41c75520807170229x7768f6d3u68fb6369bafea270@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: kometen@gmail.com, system@ijs.co.id
  Subject: Re: log_statement at postgres.conf
  In-Reply-To: <b41c75520807170229x7768f6d3u68fb6369bafea270@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox