Re: Logging conflicted queries on deadlocks

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: 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, "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>
Subject: Re: Logging conflicted queries on deadlocks
Date: 2008-03-23 02:21:50
Message-ID: 26439.1206238910@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

I wrote:
>>>> One thing that I worried about for a little bit is that you can imagine
>>>> privilege-escalation scenarios.

> A conservative approach would be to report the query texts *only* in the
> server log and never to the client --- this would need a bit of klugery
> but seems doable.

Anybody have any opinions about changing this or sticking with the
behavior as-submitted? It doesn't seem like an open-and-shut issue
to me.

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.

Comments welcome.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2008-03-23 02:29:44 Re: Logging conflicted queries on deadlocks
Previous Message Bruce Momjian 2008-03-23 01:51:39 Re: Idea for minor tstore optimization

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2008-03-23 02:29:44 Re: Logging conflicted queries on deadlocks
Previous Message Tom Lane 2008-03-23 01:35:35 Re: tuplestore_putvalues()