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 1s4Mie-003B4D-KG for pgsql-general@arkaria.postgresql.org; Tue, 07 May 2024 15:27:04 +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 1s4Mic-003frs-8T for pgsql-general@arkaria.postgresql.org; Tue, 07 May 2024 15:27:03 +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 1s4MgG-003aht-Ff for pgsql-general@lists.postgresql.org; Tue, 07 May 2024 15:24:38 +0000 Received: from fout4-smtp.messagingengine.com ([103.168.172.147]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s4MgD-0021Mt-2e for pgsql-general@lists.postgresql.org; Tue, 07 May 2024 15:24:36 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.nyi.internal (Postfix) with ESMTP id 57B181380128; Tue, 7 May 2024 11:24:31 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Tue, 07 May 2024 11:24:31 -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=1715095471; x=1715181871; bh=in6ySVdzyhXixc9hC6pSNwSC+KQPYDa5rbZ925DanUM=; b= hcZ4vOk9WduuZwZCCs+cBipYBh+FvtejKtFUGCh7TBWQ/RSjKsPiEqv5BIk1njde ZrP9PHw2KLFELlCATVOA9bOHtLmWS0AmOG4yZFPSmQdG/vQFyVNk5Yho26yBh2Bi a0acNTS2Jhts6B95IvR8TVd9CiUd3OgpkhobyBq4DYYPDteFnr+q7iGEqOTo5mdr 8xTzoxvukNL/UYxta7KtzzonWnwOLmC2gEhE7z8bERzW2GR6ism3mVImWAR2Fjyf JTmkLU+6FRiaRagQrNk0Kk+G2hXgCXZ7a1xXwwEialbdvCldTxfdVXME45uPI6s8 09GIiscPRgBObOAey91Gmg== 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=1715095471; x= 1715181871; bh=in6ySVdzyhXixc9hC6pSNwSC+KQPYDa5rbZ925DanUM=; b=W 6h+cqJQ66TvaGYuz2qzVMvk7tD3cIjkSblZfPRes7s69Mtm65FnOYQhC2JHYHbWh WWkriZYs5MYIiA4C2XqpkbAsokiODxJeiTb7eJHoWxye9BVm5TvkwbPpFUW1tim7 rlDJ4+uU79haYP+O6kJbLz/I49vACNXa3Am/fktMHBEwRbjIM8+wEFwos77LG1Vw W3yAmYgCBn59Q83IXfmvzzimkYxMt8dhZSVxXFH/8j0oAwT0xlziUo4iYjVPfrjM UvYgTgi2t6AcdRztaCpFzRpwt9tx6a4GcxuZDrn9QxxdwqHsZeRzv+GqGoJ/clgc YCoSmVL3gr9tVP7VPDvTQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvddvkedgkeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttddvjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeekfeehuddvjeeigfeifeejtdduudffledvfeelheef tdeiffeugfdvkeelgedtvdenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhi rghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 7 May 2024 11:24:30 -0400 (EDT) Message-ID: <7c5b3f29-d82d-4cac-9aeb-8a4c0085ddf2@aklaver.com> Date: Tue, 7 May 2024 08:24:29 -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: <5910d4dcbe244548bbf482dad0ceca83@uk.thalesgroup.com> <4b64d2cc-1df6-4982-b842-39fb0d886731@aklaver.com> <545ad7354f5f4c239df25faf8e883e98@uk.thalesgroup.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: <545ad7354f5f4c239df25faf8e883e98@uk.thalesgroup.com> 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/7/24 02:38, HORDER Philip wrote: > Thanks for your time Adrian > > >> Is there enough data processing? > > Yes, one table is receiving upwards of 20 million rows daily. > We noticed the problem when fetch performance on this table degraded after updates. > >> Autovacuum has thresholds for turning on, are you sure those thresholds are just not being met? > > Yes we're sure. Our biggest table is set for a fixed number of rows rather than a percentage, this gets an auto analyse about every 15 minutes. > > After an update this just stops, and there are no analyse entries in the log file. None at all, for any table. 1) What is the exact pg_restore command you are using? 2) From earlier post: '... only analyzes tables in the new db at the point of reload, then shuts off again.' Provide that sequence of events from the Postgres log. 3) Also statistics from https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-PG-STAT-ALL-TABLES-VIEW for that table after the reload. > > When we restart Postgres the auto analyse restarts and catches up with the backlog. > > > Phil Horder > Database Mechanic > > Thales > Land & Air Systems > > 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