Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s7dCx-006Xb5-Mj for pgsql-general@arkaria.postgresql.org; Thu, 16 May 2024 15:39:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1s7dCx-00AtSy-DT for pgsql-general@arkaria.postgresql.org; Thu, 16 May 2024 15:39:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s7dCw-00AtSq-Hw for pgsql-general@lists.postgresql.org; Thu, 16 May 2024 15:39:51 +0000 Received: from wfhigh6-smtp.messagingengine.com ([64.147.123.157]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s7dCs-000YsI-Du for pgsql-general@lists.postgresql.org; Thu, 16 May 2024 15:39:49 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.west.internal (Postfix) with ESMTP id 2872F1800090; Thu, 16 May 2024 11:39:45 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 16 May 2024 11:39:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1715873984; x=1715960384; bh=9LiNBHenElBzmfB/ID1MrOXl9SK8gfbD00t5/0fvF8A=; b= b8Et6Hdu0bN/Be+WFJfbnyqL4QCEbBwQ7K0/nS5BKjReFSrqW/j5uBNAGmxtOO4s c4gQN5qIhpKvVn0HaiVFYnPgR/ic+eAkmErE7rE4LprZiD87gBzvQvocHOMTXqcR 0SWm3/YeFAC6AS7B4aB9AdC+bOEsLsVWpUjJuPCjDUudehcMOFlXCO+DURAX0a9B 4xLCX2dcPknrqqp8s03zrVsvZSUD8xBltmFcCpSqHoXFMJ5W9OcAL0lAC85ko5gX 5Cs41i6csd0//R47ZL3T9QPuxwwqZJmJic27Ke6SI8AeaqT/bLv+YKTLCklEARZ6 4fCR6HkHYuQi3e2XVq/PqQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1715873984; x= 1715960384; bh=9LiNBHenElBzmfB/ID1MrOXl9SK8gfbD00t5/0fvF8A=; b=E 6qtSFuQUG9uryJEAgpRZ3I2zC48UiR4F5TnNF0FoabQR9xcgJlruri83MHftUEmm 3/7Q+PJpgxwYu4Y6M1AAwcDli0I0f9ZIAdfmTF1ljsIkrt0CUomF99X19BjXtKu7 D+tOJjeRSakgF0PVnLaTG65BHUrL0mwNvRYpY0IuazkJhFcTAI9QNDbtGY6lKKP7 Vvn0XtyzSaCdQciTCFjfJlasWq0/11NZsJ1S3Y/5/Xjm+M8pPYrdZjvMnPYxH9Qd wV2TjNlacXCRUhHhfkPlwT9o04au3TMmTycfeDBKO5td5Ota2ZytuSPx7RB/EIKj J8RRDvvR32+ewnF8OwO7g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdehuddgledtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttddvjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeeivdfhieehheegueeileejieettdejhedugeefleek vdelkeehtdfgiefffeekudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 May 2024 11:39:43 -0400 (EDT) Message-ID: <558d0566-54dd-494c-8828-f8087e7f8df4@aklaver.com> Date: Thu, 16 May 2024 08:39:43 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Restore of a reference database kills the auto analyze processing. To: HORDER Philip , "pgsql-general@lists.postgresql.org" References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 5/16/24 07:38, HORDER Philip wrote: > Classified as: {OPEN} > >> Did you have chance to do below? >> Using psql do > >> \x >> select * from pg_stat_all_tables where relname = 'a.accp'; > > Sorry, missed that bit. > From this output you can see that no stats have been collected since the last two overnight updates. Still your contention was that autovacuum quit running after the initial restore and that is not the case. Assuming this is the instance you restored on May 2 2024 then approximate counts are: autovacuum_count 1888/13 days = 145 autovacuums/day = 6/hour autoanalyze_count 1715/13 = 132 autoanalyze/day = 5.5/hr > > postgres=# select * from pg_stat_all_tables where relname='accp'; > -[ RECORD 1 ]-------+-------------------------------- > relid | 811486381 > schemaname | a > relname | accp > seq_scan | 1654767 > seq_tup_read | 901811880 > idx_scan | 146070383 > idx_tup_fetch | 305949969 > n_tup_ins | 2056948 > n_tup_upd | 0 > n_tup_del | 1662699 > n_tup_hot_upd | 0 > n_live_tup | 294 > n_dead_tup | 75162 > n_mod_since_analyze | 0 > n_ins_since_vacuum | 75162 > last_vacuum | > last_autovacuum | 2024-05-15 03:25:16.007386+00 > last_analyze | > last_autoanalyze | 2024-05-15 03:25:16.008873+00 > vacuum_count | 0 > autovacuum_count | 1888 > analyze_count | 19836 > autoanalyze_count | 1715 > > > Phil Horder > Database Mechanic > > Thales > Land & Air Systems > > > {OPEN} > The information contained in this e-mail is confidential. It is intended only for the stated addressee(s) and access to it by any other person is unauthorised. If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this e-mail. Such unauthorised use may be unlawful. If you have received this e-mail in error, please inform the originator immediately and delete it and all copies from your system. > > Thales UK Limited. A company registered in England and Wales. Registered Office: 350 Longwater Avenue, Green Park, Reading, Berks RG2 6GF. Registered Number: 868273 > > Please consider the environment before printing a hard copy of this e-mail. -- Adrian Klaver adrian.klaver@aklaver.com