Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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

pgsql-hackers by date

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

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group