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

Re: Question about ALTER TABLE DROP CONSTRAINT on 9.1 -- psql crashes

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Williamson <gwilliamson39(at)yahoo(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Question about ALTER TABLE DROP CONSTRAINT on 9.1 -- psql crashes
Date: 2012-08-10 02:24:40
Message-ID: 502470E8.4010807@ringerc.id.au (view raw or flat)
Thread:
Lists: pgsql-admin
On 08/10/2012 10:06 AM, Tom Lane wrote:
> Greg Williamson <gwilliamson39(at)yahoo(dot)com> writes:
>> Every minute on the minute there is a cronjob that kills IDLE IN CONNECTION procs older than 3 seconds ... possibly that process killed the process I was running, but to me the user it seemed as if the COMMIT came before the disconnect.
> That sure sounds like the source of your problem.  It might be sane if
> it killed only processes that *had been idle* for at least three
> seconds, but I'm not sure there is any easy way to determine that ...
wouldn't:

select * from pg_stat_activity
where current_query = '<IDLE> in transaction'
AND query_start < current_timestamp - INTERVAL '3 seconds';

do it?

--
Craig Ringer

In response to

Responses

pgsql-admin by date

Next:From: Tom LaneDate: 2012-08-10 04:20:48
Subject: Re: Question about ALTER TABLE DROP CONSTRAINT on 9.1 -- psql crashes
Previous:From: Tom LaneDate: 2012-08-10 02:06:57
Subject: Re: Question about ALTER TABLE DROP CONSTRAINT on 9.1 -- psql crashes

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