Re: Logging conflicted queries on deadlocks

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>, ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Logging conflicted queries on deadlocks
Date: 2008-03-23 02:29:44
Message-ID: 20080323022944.GH13206@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-03-23 02:42:08 Re: Logging conflicted queries on deadlocks
Previous Message Tom Lane 2008-03-23 02:21:50 Re: Logging conflicted queries on deadlocks

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2008-03-23 02:42:08 Re: Logging conflicted queries on deadlocks
Previous Message Tom Lane 2008-03-23 02:21:50 Re: Logging conflicted queries on deadlocks