From: John R Pierce <pierce@hogranch.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Craig Ringer <craig@postnewspapers.com.au>
Cc: Oliver Jowett <oliver@opencloud.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Connection.setReadOnly()
Date: Fri, 11 Dec 2009 13:24:17 -0800
Message-ID: <4B22B881.4000306@hogranch.com> (raw)
In-Reply-To: <17892.1260545186@sss.pgh.pa.us>
References: <4B21737B.50009@hogranch.com>
<alpine.BSO.2.00.0912101744080.30821@leary.csoft.net>
<4B219025.5070607@hogranch.com>
<4B219538.2090203@opencloud.com>
<4B2198E4.5090306@hogranch.com>
<4B219D76.1080600@opencloud.com>
<4B225922.1090705@postnewspapers.com.au>
<17892.1260545186@sss.pgh.pa.us>
Tom Lane wrote:
> As of 8.4, I think the above statements are true. In prior releases,
> transactions just advertised the age of their first snapshot, so an
> open transaction created an issue for VACUUM regardless of whether
> it was serializable or not. 8.4 has more bookkeeping that allows a
> transaction to report that it currently has no live snapshots.
>
I've been using this...
pgadmin=# select datname,procpid,usename,now() - xact_start as "Age",
current_query from pg_stat_activity where now()-xact_start> interval '30
min' order by xact_start;
datname | procpid | usename | Age |
current_query
---------+---------+---------+-----------------+------------------------------------------------
lss | 22528 | fds | 11:43:15.715747 | <IDLE> in transaction
lss | 22979 | fds | 11:38:27.101715 | <IDLE> in transaction
lss | 22980 | fds | 11:38:27.101676 | <IDLE> in transaction
lss | 23150 | fds | 11:36:39.850232 | <IDLE> in transaction
lss | 22987 | pgadmin | 03:38:57.974805 | autovacuum: VACUUM
ANALYZE ts.disc_yield_daily
lss | 24272 | pgadmin | 02:37:19.303353 | autovacuum: VACUUM
ANALYZE ts.disc_yield_hour
(6 rows)
to detect old stale transactions and other long running operations
in 8.4, there's a different high water mark I should be using instead?
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: pierce@hogranch.com, tgl@sss.pgh.pa.us, craig@postnewspapers.com.au, oliver@opencloud.com
Subject: Re: Connection.setReadOnly()
In-Reply-To: <4B22B881.4000306@hogranch.com>
References: <4B21737B.50009@hogranch.com> <alpine.BSO.2.00.0912101744080.30821@leary.csoft.net> <4B219025.5070607@hogranch.com> <4B219538.2090203@opencloud.com> <4B2198E4.5090306@hogranch.com> <4B219D76.1080600@opencloud.com> <4B225922.1090705@postnewspapers.com.au> <17892.1260545186@sss.pgh.pa.us> <4B22B881.4000306@hogranch.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox