From: | Sam Mason <sam(at)samason(dot)me(dot)uk> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Clients disconnect but query still runs |
Date: | 2009-08-06 17:06:42 |
Message-ID: | 20090806170642.GW5407@samason.me.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thu, Aug 06, 2009 at 07:23:41AM -0700, Nicolas wrote:
> Now, I'm in a situation where I have many "IDLE in transaction". I
> spotted them myself. I could kill them, but that wouldn't prevent them
> from happening again. In fact, it happens regularily.
>
> Is there a way to get the list of SQL statements that were previously
> executed as part of a given transaction?
I'd play with logging and setting your "log_line_prefix"[1] to include
the process id and "log_statement" to "all". It's then a simple matter
of searching back through the logs to find out what was going on.
--
Sam http://samason.me.uk/
[1] http://www.postgresql.org/docs/current/static/runtime-config-logging.html#GUC-LOG-LINE-PREFIX
[2] http://www.postgresql.org/docs/current/static/runtime-config-logging.html#GUC-LOG-STATEMENT
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2009-08-06 17:15:57 | Re: Empty Updates, ON UPDATE triggers and Rules |
Previous Message | decibel | 2009-08-06 16:59:57 | What happens when syslog gets blocked? |