Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 3085D64FF7A for ; Thu, 17 Jul 2008 06:29:32 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 19472-01 for ; Thu, 17 Jul 2008 06:29:22 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.157]) by postgresql.org (Postfix) with ESMTP id 8D3C064FF4F for ; Thu, 17 Jul 2008 06:29:25 -0300 (ADT) Received: by fg-out-1718.google.com with SMTP id 16so3221669fgg.23 for ; Thu, 17 Jul 2008 02:29:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=nATtLev0ZjmhlaiIyCxCkWy4Mn3kh0g+dKmvUW+pknA=; b=rN5nUYtupQoM+E9769/akDH8h8TRnbW3oOg6rGm7tVq0ygEHAl4+gnYnLgQFunYZEX eMorWDVcs0bazGXkRyhfidGWmGUhfZrwGmvCCjEEQh9m1ZUiTBktwsTUAbLZGigDFX/w BVjuxLkXgTqVy8Rm77nkqB5bbAf825EZVvtp4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=btaIOxmxFpLkcai+JXqe4JQvPDG19/upSWt/eJJR8EiBtr8BmjzeWL5J2fOtLVB13I 2PPLobcyzLwCgxijRs70F4sVIhzQOMeGVoe6Tet7W6xf/jyr+fuAIWhXjiITPdq7nx2p XKdJWII9tNJZ1LgzkibfhFe9dpUM4gwiHfKjQ= Received: by 10.86.72.3 with SMTP id u3mr3628504fga.37.1216286963398; Thu, 17 Jul 2008 02:29:23 -0700 (PDT) Received: by 10.86.81.6 with HTTP; Thu, 17 Jul 2008 02:29:23 -0700 (PDT) Message-ID: Date: Thu, 17 Jul 2008 11:29:23 +0200 From: "Claus Guttesen" To: "System/IJS - Joko" Subject: Re: log_statement at postgres.conf Cc: pgsql-performance@postgresql.org In-Reply-To: <01a601c8e7e9$41ad45d0$12068cc0@edp03> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <01a601c8e7e9$41ad45d0$12068cc0@edp03> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200807/139 X-Sequence-Number: 30739 > 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