pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: pinker <pinker@onet.eu>
To: pgsql-general@postgresql.org
Subject: Re: unreliable behaviour of track_functions
Date: Sat, 31 Mar 2018 17:17:22 -0700 (MST)
Message-ID: <1522541842492-0.post@n3.nabble.com> (raw)
In-Reply-To: <650a05f5-2926-5a63-e653-2ae5aa903547@aklaver.com>
References: <1522539643653-0.post@n3.nabble.com>
	<650a05f5-2926-5a63-e653-2ae5aa903547@aklaver.com>

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? 
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?




--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html




view thread (8+ messages)  latest in thread

Message-ID: <1522541842492-0.post@n3.nabble.com>
Permalink:  ../1522541842492-0.post@n3.nabble.com/
Also on:    postgresql.org/message-id/1522541842492-0.post@n3.nabble.com

 · 

reply

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-general@postgresql.org
  Cc: pinker@onet.eu
  Subject: Re: unreliable behaviour of track_functions
  In-Reply-To: <1522541842492-0.post@n3.nabble.com>
  References: <1522539643653-0.post@n3.nabble.com> <650a05f5-2926-5a63-e653-2ae5aa903547@aklaver.com> <1522541842492-0.post@n3.nabble.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