pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: tv@fuzzy.cz
To: Greg Smith <greg@2ndquadrant.com>
Cc: Tomas Vondra <tv@fuzzy.cz>
Cc: pgsql-performance@postgresql.org
Subject: Re: [ADMIN] since when has pg_stat_user_indexes.idx_scan been counting?
Date: Fri, 13 May 2011 10:44:47 +0200
Message-ID: <83c98c67ff4e97ff3f4db785b05dabe7.squirrel@sq.gransy.com> (raw)
In-Reply-To: <4DCC96BB.1030609@2ndquadrant.com>
References: <BANLkTikhNLPhCjE819=RFG-+CB6UV4GbUA@mail.gmail.com>
	<BANLkTimeo-P+=fxKzui1Md2Siq_YJ7ASug@mail.gmail.com>
	<BANLkTinTsg18Wk9+JPrpfOXCkn-W0D2TNw@mail.gmail.com>
	<4DCC4718.8000409@fuzzy.cz>
	<4DCC96BB.1030609@2ndquadrant.com>

> It's not synchronous at all.  The clients create a temporary file for
> the statistics collector and move on.  The actual statistics don't get
> updated until the statistics collector decides enough time has passed to
> bother, which defaults to at most every 500ms.

Really? I thought the clients send the updates using a socket, at least
that's what I see in backend/postmaster/pgstat.c (e.g. in
pgstat_send_bgwriter where the data are sent, and in PgstatCollectorMain
where it's read from the socket and applied).

But no matter how exactly this works, this kind of stats has nothing to do
with ANALYZe - it's asynchronously updated every time you run a query.

regards
Tomas




view thread (10+ messages)

Message-ID: <83c98c67ff4e97ff3f4db785b05dabe7.squirrel@sq.gransy.com>
Permalink:  ../83c98c67ff4e97ff3f4db785b05dabe7.squirrel@sq.gransy.com/
Also on:    postgresql.org/message-id/83c98c67ff4e97ff3f4db785b05dabe7.squirrel@sq.gransy.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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tv@fuzzy.cz, greg@2ndquadrant.com
  Subject: Re: [ADMIN] since when has pg_stat_user_indexes.idx_scan been counting?
  In-Reply-To: <83c98c67ff4e97ff3f4db785b05dabe7.squirrel@sq.gransy.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