X-Original-To: pgsql-interfaces@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 8423F475E30 for ; Thu, 27 Feb 2003 12:42:25 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 81728-05 for ; Thu, 27 Feb 2003 12:42:14 -0500 (EST) Received: from localhost.localdomain (167.95.252.64.snet.net [64.252.95.167]) by postgresql.org (Postfix) with ESMTP id 5D520475E4A for ; Thu, 27 Feb 2003 12:17:20 -0500 (EST) Received: (from wweng@localhost) by localhost.localdomain (8.11.6/8.11.6) id h1RHI6h31380; Thu, 27 Feb 2003 12:18:06 -0500 X-Authentication-Warning: localhost.localdomain: wweng set sender to wweng@kencast.com using -f Date: Thu, 27 Feb 2003 12:18:06 -0500 From: Wei Weng To: Tom Lane Cc: pgsql-interfaces@postgresql.org Subject: Re: debug a mess Message-ID: <20030227121806.A31374@example.com> Reply-To: Wei Weng References: <20030225155820.B24120@example.com> <13032.1046208448@sss.pgh.pa.us> <20030226161011.A28093@example.com> <6489.1046295261@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <6489.1046295261@sss.pgh.pa.us>; from tgl@sss.pgh.pa.us on Wed, Feb 26, 2003 at 04:34:21PM -0500 X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/121 X-Sequence-Number: 3742 On 26/02/03 16:34 -0500, Tom Lane wrote: > Wei Weng writes: > > Where is postmaster log? I found a new file in /var/log/pgsql. I put > > log_connections = yes and syslog = 2 into my postgresql.conf file and expect > > something to happen. Restarted postgresql service on my redhat 7.3 box and > > tried a couple of queries with psql utility. Nothing seemed to have been > > logged in /var/log/pgsql. > > If you want to use syslog then you'd better be sure that syslogd is > configured to do something useful with Postgres messages, and not just > drop 'em on the floor. > > If you want to use stderr, look at the start script. Some distros > provide Postgres start scripts that route the postmaster's stderr to > /dev/null --- either explicitly, or by using the infamous -S switch. > Tom: I checked pg_config's output, in my redhat build, syslog is already enabled. So that clears some of my doubt. This is how I started my postmaster. su postgres /usr/bin/pg_ctl -D $PGDATA -l /var/log/pgsql -p /usr/bin/postmaster start > /var/log/pgsql 2>&1 I am trying my best to force the postmaster to write to the /var/log/pgsql file. But it didn't seem to work at all. All there in /var/log/pgsql is a oneline "postmaster successfully started". I checked the manpages, and all they say about log is use -l switch (which I used). Can you provide a little more hints? Thanks! Wei