Re: "sniffing" postgres queries

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Anton Melser" <melser(dot)anton(at)gmail(dot)com>
Cc: Postgresql <pgsql-general(at)postgresql(dot)org>
Subject: Re: "sniffing" postgres queries
Date: 2007-03-21 00:12:37
Message-ID: 19331.1174435957@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Anton Melser" <melser(dot)anton(at)gmail(dot)com> writes:
> I am having real trouble with a project that is a little out of my
> league and I just can't find out how to find which table the app is
> getting its values from (it's a long story...). I know what values I
> am looking for, and would like to log everything (even if only for one
> call of a web page...) that comes in and everything that goes out. Is
> this possible at the db level? Even debug5 doesn't seem to give me the
> result of a query... If it is only possible at the driver level (I did
> something vaguely similar with the odbc driver I think), then any
> pointers for a jdbc2 on 8.1.4?

Doesn't log_statement = ALL get the job done for you? If you need to
correlate queries with results then I guess not; there is no provision
for logging query results. The nearby suggestion to use a packet
sniffer is probably your only recourse for that. I'd suggest that you
may also need to set the driver to use protocol version 2, so that all
the queries come in in plain text --- otherwise you'll have some
difficulty interpreting the packet streams ...

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Brent Wood 2007-03-21 00:39:33 Re: Approximate join on timestamps
Previous Message Jorge Godoy 2007-03-21 00:03:00 Re: Fwd: Approximate join on timestamps