Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id E9E28B5D8C5 for ; Fri, 13 May 2011 05:44:55 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 75210-08 for ; Fri, 13 May 2011 08:44:49 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from elizabeth.gransy.com (elizabeth.gransy.com [89.187.132.199]) by mail.postgresql.org (Postfix) with ESMTP id D17F4B5D80B for ; Fri, 13 May 2011 05:44:48 -0300 (ADT) Received: from sq.gransy.com (localhost [127.0.0.1]) by elizabeth.gransy.com (Postfix) with ESMTP id 5FBBC15E40D8; Fri, 13 May 2011 10:44:47 +0200 (CEST) Received: from 85.161.131.108 (SquirrelMail authenticated user tv@fuzzy.cz) by sq.gransy.com with HTTP; Fri, 13 May 2011 10:44:47 +0200 Message-ID: <83c98c67ff4e97ff3f4db785b05dabe7.squirrel@sq.gransy.com> In-Reply-To: <4DCC96BB.1030609@2ndquadrant.com> References: <4DCC4718.8000409@fuzzy.cz> <4DCC96BB.1030609@2ndquadrant.com> Date: Fri, 13 May 2011 10:44:47 +0200 Subject: Re: [ADMIN] since when has pg_stat_user_indexes.idx_scan been counting? From: tv@fuzzy.cz To: "Greg Smith" Cc: "Tomas Vondra" , pgsql-performance@postgresql.org User-Agent: SquirrelMail/1.4.21 MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.001 tagged_above=-10 required=5 tests=BAYES_20=-0.001 X-Spam-Level: X-Archive-Number: 201105/200 X-Sequence-Number: 43709 > 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