X-Original-To: pgsql-interfaces@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 4536E474E42 for ; Wed, 26 Feb 2003 16:09:52 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 41828-08 for ; Wed, 26 Feb 2003 16:09:41 -0500 (EST) Received: from localhost.localdomain (167.95.252.64.snet.net [64.252.95.167]) by postgresql.org (Postfix) with ESMTP id 1C8A9474E53 for ; Wed, 26 Feb 2003 16:09:39 -0500 (EST) Received: (from wweng@localhost) by localhost.localdomain (8.11.6/8.11.6) id h1QLACm28110; Wed, 26 Feb 2003 16:10:12 -0500 X-Authentication-Warning: localhost.localdomain: wweng set sender to wweng@kencast.com using -f Date: Wed, 26 Feb 2003 16:10:12 -0500 From: Wei Weng To: Tom Lane Cc: Matthew Vanecek , pgsql-interfaces@postgresql.org Subject: Re: debug a mess Message-ID: <20030226161011.A28093@example.com> Reply-To: Wei Weng References: <20030225155820.B24120@example.com> <13032.1046208448@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: <13032.1046208448@sss.pgh.pa.us>; from tgl@sss.pgh.pa.us on Tue, Feb 25, 2003 at 04:27:28PM -0500 X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/116 X-Sequence-Number: 3737 On 25/02/03 16:27 -0500, Tom Lane wrote: > Wei Weng writes: > > The entire code from PQconnect until PQfinish goes like this: > > That sure looks harmless. I wonder if there is something failing in the > PQconnect() step (like the queries that libpq sends on its own)? > > I'd suggest enabling query logging --- see postgresql.conf, or just do > export PGOPTIONS="--log_statement=1" > before starting your program. (Check Admin Guide first, as this > parameter got renamed recently.) Then look in the postmaster log to get > a better idea of what's really going on. 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. Under /var/lib/pgsql/data, there isn't any new files appearing. By the way, how do I check to see what kind of options had been used in my postgresql build? Thanks Wei