Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hDyIm-0004rt-KO for pgsql-general@arkaria.postgresql.org; Tue, 09 Apr 2019 21:29:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hDyIl-0001J4-DM for pgsql-general@arkaria.postgresql.org; Tue, 09 Apr 2019 21:29:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hDyIj-00017I-JK for pgsql-general@lists.postgresql.org; Tue, 09 Apr 2019 21:29:07 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hDyIf-0007lP-Hc for pgsql-general@lists.postgresql.org; Tue, 09 Apr 2019 21:29:05 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 1CA3B2079B; Tue, 9 Apr 2019 17:29:00 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 09 Apr 2019 17:29:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=+ wb6fzLzzMbzrQd8L0r4P4RPnfXyr9OTY2tmlKNI3KI=; b=scNtwQ02WifR8mouZ fLZ+hJLwG2Ow7bTfdQS7FmJ+mL1bBA0MI/D478+D94U6b0Ud4NP7zvzbnfNC/AL2 sfsqrwINsQ0exLzGv+73DEMdtmfjLAt2NzqfJ1gh6zRGynaT+9qgkHWjCfdyLEkj YYq8f28dse+pvfhhyBREMb+Lx6IphFm/Ga4ah/Jv/qNVZNFSr+FcfSorAHaVw/0h VA1ZzZAvqRmuNwydcTPs6P8iphbtkEr0lpkY+Mlg1xcVrxYLTvKnYbvyt9p8+M+f B08sVN/GZZQlOQxlvofSE9smoZqh8yUAKobRJZRaHTS3V5wrYcnpQYeZNx4D6pVh Ze9PQ== 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-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=+wb6fzLzzMbzrQd8L0r4P4RPnfXyr9OTY2tmlKNI3 KI=; b=xpr1dSGapaxF+kfh7JRMaLW8WG0x3DVBAmX4qlGYTp6RyGWvw8ZhwCkcg DNoB3ysRaqEmA1iC0cZYFhrcXHzMqoGSjlYH/LXkcnG4rO0RV5LCstfWLm+E5sjZ AOIljLzIIzYp+i1e5e/MdtKRF7rZuTV1saPcUv+Xp+HB3c7lQAfG7p1zvKngUbqp Lq3HILfn9UkRjCjTLHu1cyA5f1ZQ32t2T1xiOTteRjpvqQ0unlNMRB0McIiFs1yS 3X/QcAjtExMaWl1f6vqkBZNzqcxWtBC7xNqf6pva4oRhm4aYTeRlRNRHJs1Z65dB Z+EXPRHa6Q02Yzm1rdWwJn6Fz7thQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrudehgdduiedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucfkphephedtrdduleejrdektddrvdenucfrrghrrghmpehmrghilhhfrhhomhep rggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomhenucevlhhushhtvghruf hiiigvpedt X-ME-Proxy: Received: from ranger.suse (50-197-80-2-static.hfc.comcastbusiness.net [50.197.80.2]) by mail.messagingengine.com (Postfix) with ESMTPA id 581341030F; Tue, 9 Apr 2019 17:28:59 -0400 (EDT) Subject: Re: Does pg_stat_get_live_tuples() matter? To: Sherrylyn Branchaw , pgsql-general@lists.postgresql.org References: From: Adrian Klaver Message-ID: Date: Tue, 9 Apr 2019 14:28:58 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: 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 4/9/19 9:45 AM, Sherrylyn Branchaw wrote: > If a table has 1.8M rows in reality, yet pg_stat_get_live_tuples() > returns 1.8K, does it matter to the performance of the database, as long > as pg_class.reltuples is the right order of magnitude? What version of Postgres? How are you getting at the 1.8M number? > > The query planner seems to use the accurate estimate, but what about the > autovacuum daemon? Or anything else? > > In short, is pg_stat_get_live_tuples() (and the views that invoke it) > used by any built-in tooling, or is it just there for the user to do > monitoring? > > Thanks, > Sherrylyn -- Adrian Klaver adrian.klaver@aklaver.com