Received: from candle.pha.pa.us (216-55-132-35.dsl.san-diego.abac.net [216.55.132.35]) by postgresql.org (Postfix) with ESMTP id 75E30475C18 for ; Tue, 30 Jul 2002 00:14:17 -0400 (EDT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id g6U4EGI29236; Tue, 30 Jul 2002 00:14:16 -0400 (EDT) From: Bruce Momjian Message-Id: <200207300414.g6U4EGI29236@candle.pha.pa.us> Subject: Re: log sql? In-Reply-To: <20020729084413.A8252@mail.libertyrms.com> To: Andrew Sullivan Date: Tue, 30 Jul 2002 00:14:16 -0400 (EDT) Cc: pgsql-general@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200207/1790 X-Sequence-Number: 28276 Andrew Sullivan wrote: > On Fri, Jul 26, 2002 at 03:27:45PM -0700, Laurette Cisneros wrote: > > > > Is there way to track each sql statement and the user for the server? > > Sort of. Turn on query logging in the postgresql.conf file, and also > log connections and PID. Then, you can track back by using the PID, > to discovere who logged in (and therefore, who issued that query). Andrew, what postgresql.conf parameter is query logging. I don't see it. I see: #log_connections = false #log_timestamp = false #log_pid = false -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026