Steve Simms steve
Tue Jan 4 21:26:03 PST 2005
On Tue, 4 Jan 2005, sarlav kumar wrote:

> Can you tell me how to check if there is some other connection holding an
> open transaction?

Try something like this:

SELECT * FROM pg_stat_activity
 WHERE current_query = '<IDLE> in transaction'
    OR (query_start < NOW() - '10 minutes'::INTERVAL AND
        current_query != '<IDLE>');

This gives you a list of open clients in transactions, or queries that have
been running for longer than 10 minutes.

--
Steve Simms <steve at deefs.net>
http://www.deefs.net


More information about the Slony1-general mailing list