Re: Server error and deadlocks

From: "Orr, Steve" <sorr(at)rightnow(dot)com>
To: "'scott(dot)marlowe'" <scott(dot)marlowe(at)ihs(dot)com>
Cc: 'Tom Lane' <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general(at)postgresql(dot)org
Subject: Re: Server error and deadlocks
Date: 2003-01-16 20:17:46
Message-ID: D408B6AC060DB24790622E1A54204DB00BBB9EE9@xchange.rightnowtech.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Agreed but what I need rightnow is to find a "smoking gun" to beat the
duhvelopers on the head with in order to first get their attention. The
smoking gun would be an example of their poor SQL technique so I can ask
them, "What were you smoking when you wrote this junk?" In this context, is
there any way to create some sort of trace log of all the SQL submitted to
the server for a given time period, database, user, etc.? I can do this in
Oracle and I think it's a necessary feature.

Steve Orr

-----Original Message-----
From: scott.marlowe [mailto:scott(dot)marlowe(at)ihs(dot)com]
Sent: Tuesday, January 14, 2003 10:35 AM
To: Orr, Steve
Cc: 'Tom Lane'; pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Server error and deadlocks

On Tue, 14 Jan 2003, Orr, Steve wrote:

> You're right about the lack of foreign keys... it's a foreign concept to
the
> DUHvelopers. I suspect table locks but are there any database level
tracing
> tools to show the SQL? Will the trace_locks and debug_deadlocks parameters
> help and how do I use them?

Actually, what you need is a code audit and some training for your
developers on how real transactions work and why they don't need to use
table level locks.

I'd have them study and learn from the section in the manual on MVCC and
then go back in and change their code to use transactions with select for
update instead of table locks.

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2003-01-16 20:48:06 Re: three timestamps/table, use of 'now' in table creation statement
Previous Message Robert Treat 2003-01-16 20:12:25 Re: Bricolage on Online Tonight