Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f2UHs-000761-Vo for pgsql-general@arkaria.postgresql.org; Sun, 01 Apr 2018 04:08:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f2UHp-0002Gb-Tw for pgsql-general@arkaria.postgresql.org; Sun, 01 Apr 2018 04:08:09 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f2UHo-0002GR-Lw for pgsql-general@lists.postgresql.org; Sun, 01 Apr 2018 04:08:09 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f2UHk-0007ci-Eb for pgsql-general@postgresql.org; Sun, 01 Apr 2018 04:08:06 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id D096720D1F; Sun, 1 Apr 2018 00:08:02 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sun, 01 Apr 2018 00:08:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=PL0XW9itxlOfzYbN0gICwD8/0Zlkt wTHsY1v06qCH+U=; b=e8Rux2pjIVvY91MH/aDqZLuxoTvNPuzZdxyMbXV6b2Yxr iQYiJdtsYTQDPhqYU9rys6bv7JTDH3Lh9iNJt7LO5mVX15t727VCpsanbDxppTmw uCAefVbKhliLnu25lJv/ZQngmCLt3Aim5VT5Iu5yaqCkpASBTVmg+5vaQoL7z0l4 ySrkbf03vLUnpSX/4oVCHvcG4EEDGFdc5+DosOOer0IhbnOHXasC5PlTmfancP4u wALUqrbcLIsv/Q/Xt6mX/lndRZJpx+DxTmy6OzMW3Vw5g/vlG2fNCYPWOxBGxSQs GXHcu3PgFNYzrNwkVgI0TIb3MkZyLkaVpkKJZhaDw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=PL0XW9 itxlOfzYbN0gICwD8/0ZlktwTHsY1v06qCH+U=; b=IGkoQ8SJ92Lk9bcmP+RXo+ 5tqQ7vEjGISEt2bxtE8KD5SIFDB/46vg/u+NCQkCCpqaDvqdUbxiFPKpj8aY1WxL EOoyLi+3Tc8+ysasMuiQJjAqNyKgn/uWsoSIip+3FDbBZMHFuE8iyguTWunQr37W LQlS1CSGalZq9xdTvsaoUJu+J6skwKZAGOnDLGG44FM5SZQ3jtg16WMSpzT+6XlL nbkdV+Owgf9C2OBZcuLvzvKfO6Yb2pSITmRrmqqcQquH+EFCnYT0G9HcPaKv/fjt ab0jdMA+OAPFp+MIcC49dkOMkOfvK2O3poZZZfOngt/yv6Nv9F73UZLoHLFLu2Mw == X-ME-Sender: Received: from [192.168.1.2] (71-35-123-124.tukw.qwest.net [71.35.123.124]) by mail.messagingengine.com (Postfix) with ESMTPA id 5387B10251; Sun, 1 Apr 2018 00:08:02 -0400 (EDT) Subject: Re: unreliable behaviour of track_functions To: pinker , pgsql-general@postgresql.org References: <1522539643653-0.post@n3.nabble.com> <650a05f5-2926-5a63-e653-2ae5aa903547@aklaver.com> <1522541842492-0.post@n3.nabble.com> From: Adrian Klaver Message-ID: Date: Sat, 31 Mar 2018 21:08:01 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1522541842492-0.post@n3.nabble.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 03/31/2018 05:17 PM, pinker wrote: > Adrian Klaver-4 wrote >> https://www.postgresql.org/docs/10/static/monitoring-stats.html#PG-STAT-USER-FUNCTIONS-VIEW >> >> "...But if you want to see new results with each query, be sure to do >> the queries outside any transaction block. Alternatively, you can invoke >> pg_stat_clear_snapshot(), which will discard the current transaction's >> statistics snapshot (if any). The next use of statistical information >> will cause a new snapshot to be fetched. >> >> A transaction can also see its own statistics (as yet untransmitted to >> the collector) in the views pg_stat_xact_all_tables, >> pg_stat_xact_sys_tables, pg_stat_xact_user_tables, and >> pg_stat_xact_user_functions. These numbers do not act as stated above; >> instead they update continuously throughout the transaction. >> >> " >> Adrian Klaver > >> adrian.klaver@ > > > Thank you for that, but does this strange behaviour should not be better > documented? This came from the documentation, so I am not sure what you mean by better documented? > If somebody (like me, I have some time ago being unaware of this behaviour) > wants to build a monitoring system that base on the view > pg_stat_user_functions, should not be informed what to expect? See comment above. > > > > > -- > Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html > > -- Adrian Klaver adrian.klaver@aklaver.com