Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 4C859633ACB for ; Fri, 20 Mar 2009 14:51:09 -0300 (ADT) 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 39040-03 for ; Fri, 20 Mar 2009 14:51:04 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from elite.newx.com.br (newx.com.br [74.55.91.162]) by mail.postgresql.org (Postfix) with ESMTP id 0A9056339AF for ; Fri, 20 Mar 2009 14:50:45 -0300 (ADT) Received: from [201.37.112.242] by elite.newx.com.br with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1Lkirb-0007k6-Mx; Fri, 20 Mar 2009 14:50:35 -0300 Message-ID: <49C3D76C.9040400@timbira.com> Date: Fri, 20 Mar 2009 14:50:36 -0300 From: Euler Taveira de Oliveira User-Agent: Thunderbird 2.0.0.19 (X11/20090106) MIME-Version: 1.0 To: "ml@bortal.de" CC: pgsql-performance@postgresql.org Subject: Re: current transaction in productive database References: <49C36145.1080909@bortal.de> In-Reply-To: <49C36145.1080909@bortal.de> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - elite.newx.com.br X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - timbira.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200903/295 X-Sequence-Number: 33217 ml@bortal.de escreveu: > is there a way to find out, how many transactions my currenc productive > database is doing? > If you're looking for number of transactions then you can query the catalogs as: $ export myq="select sum(xact_commit+xact_rollback) from pg_stat_database" $ psql -U postgres -c "$myq" && sleep 60 && psql -U postgres -c "$myq" sum ----------- 178992891 (1 row) sum ----------- 178996065 (1 row) $ bc -q scale=3 (178996065-178992891)/60 52.900 Depending on your workload pattern, it's recommended to increase the sleep time. -- Euler Taveira de Oliveira http://www.timbira.com/