Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 33BF76329F3 for ; Fri, 11 Dec 2009 17:24:48 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 61715-04 for ; Fri, 11 Dec 2009 21:24:33 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from hogranch.com (hogranch.com [75.101.82.47]) by mail.postgresql.org (Postfix) with ESMTP id 4488A632A1B for ; Fri, 11 Dec 2009 17:24:37 -0400 (AST) Received: from [192.168.0.2] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id nBBLOMG05529; Fri, 11 Dec 2009 13:24:22 -0800 Message-ID: <4B22B881.4000306@hogranch.com> Date: Fri, 11 Dec 2009 13:24:17 -0800 From: John R Pierce User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Tom Lane CC: Craig Ringer , Oliver Jowett , pgsql-jdbc@postgresql.org Subject: Re: Connection.setReadOnly() References: <4B21737B.50009@hogranch.com> <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> In-Reply-To: <17892.1260545186@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.43 tagged_above=-10 required=5 tests=AWL=0.169, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200912/30 X-Sequence-Number: 20111 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 | in transaction lss | 22979 | fds | 11:38:27.101715 | in transaction lss | 22980 | fds | 11:38:27.101676 | in transaction lss | 23150 | fds | 11:36:39.850232 | 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?