| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | "Orr, Steve" <sorr(at)rightnow(dot)com> |
| Cc: | "'scott(dot)marlowe'" <scott(dot)marlowe(at)ihs(dot)com>, pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Server error and deadlocks |
| Date: | 2003-01-16 21:06:16 |
| Message-ID: | 27559.1042751176@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
"Orr, Steve" <sorr(at)rightnow(dot)com> writes:
> 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.?
See the logging options in postgresql.conf.
If you are interested, attached is the patch I just applied to CVS HEAD
to print out information about deadlocks. It should apply cleanly to
7.3.*. Sample output is
regression=# lock table tenk1;
NOTICE: Proc 27417 waits for AccessExclusiveLock on relation 18987 database 17054; blocked by 27415
NOTICE: Proc 27415 waits for ShareLock on transaction 6446; blocked by 27417
ERROR: deadlock detected
regression=#
regards, tom lane
| Attachment | Content-Type | Size |
|---|---|---|
| unknown_filename | text/plain | 12.0 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruno Wolff III | 2003-01-16 21:21:58 | Re: three timestamps/table, use of 'now' in table creation statement |
| Previous Message | Dennis Gearon | 2003-01-16 21:00:44 | Re: three timestamps/table, use of 'now' in table creation statement |