Re: Logging conflicted queries on deadlocks - Mailing list pgsql-patches

From Alvaro Herrera
Subject Re: Logging conflicted queries on deadlocks
Date
Msg-id 20080323022944.GH13206@alvh.no-ip.org
Whole thread Raw
In response to Re: Logging conflicted queries on deadlocks  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Logging conflicted queries on deadlocks  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Tom Lane wrote:

> If we report the query texts only to the server log, we could remove all
> restrictions on which users' queries would be reported.  That would
> clearly be helpful in some cases.  On the other hand, it would clearly
> be less convenient to use than the existing approach that sends
> information to the client.  I'm not real excited about adding still
> another wart to ereport() to make this possible, either.

I think we should report to the client where it is not a security
breach, and to the server log otherwise.

I'm not sure about warts.  A separate server-only context field perhaps?
Or a separate flag in ErrorData elements saying whether each particular
one should go to server only.

If we add that, perhaps we could clean up the stuff in
checkSharedDependency with it, too.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Logging conflicted queries on deadlocks
Next
From: Tom Lane
Date:
Subject: Re: Logging conflicted queries on deadlocks