Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id B86D09FB96A; Wed, 16 May 2007 12:15:19 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 14547-02; Wed, 16 May 2007 12:15:15 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from momjian.us (momjian.us [70.90.9.53]) by postgresql.org (Postfix) with ESMTP id 2B6B59FB4D9; Wed, 16 May 2007 12:15:15 -0300 (ADT) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id l4GFF9T03064; Wed, 16 May 2007 11:15:09 -0400 (EDT) From: Bruce Momjian Message-Id: <200705161515.l4GFF9T03064@momjian.us> Subject: Re: [HACKERS] row-level stats and last analyze time In-Reply-To: <18709.1178501121@sss.pgh.pa.us> To: Tom Lane Date: Wed, 16 May 2007 11:15:09 -0400 (EDT) CC: Neil Conway , Guillaume Lelarge , pgsql-docs@postgresql.org, pgsql-hackers X-Mailer: ELM [version 2.4ME+ PL123] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/47 X-Sequence-Number: 4276 Has this been done yet? I don't think so. --------------------------------------------------------------------------- Tom Lane wrote: > Neil Conway writes: > > On Thu, 2007-26-04 at 18:07 -0400, Neil Conway wrote: > >> (1) I believe the reasoning for Tom's earlier change was not to reduce > >> the I/O between the backend and the pgstat process [...] > > > Tom, any comments on this? Your change introduced an undocumented > > regression into 8.2. I think you're on the hook for a documentation > > update at the very least, if not a revert. > > The documentation update seems the most prudent thing to me. The > problem with the prior behavior is that it guarantees that every table > in the database will eventually have a pg_stat entry, even if > stats_row_level and stats_block_level are both off. In a DB with lots > of tables that creates a significant overhead *for a feature the DBA > probably thinks is turned off*. This is not how it worked before 8.2, > and so 8.2.0's behavior is arguably a performance regression compared > to 8.1 and before. > > Now this patch went in before we realized that 8.2.x had a bug in > computing the stats-file-update delay, and it could be that after fixing > that the problem is not so pressing. But I don't particularly care for > new features that impose a performance penalty on those who aren't using > them, and that's exactly what last_vacuum/last_analyze tracking does if > we allow it to bloat the stats file in the default configuration. > > The long-term answer of course is to devise a more efficient stats > reporting scheme, but I'm not sure offhand what that would look like. > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 7: You can help support the PostgreSQL project by donating at > > http://www.postgresql.org/about/donate -- Bruce Momjian http://momjian.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. +