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 1s9XP4-0033dC-0e for pgsql-general@arkaria.postgresql.org; Tue, 21 May 2024 21:52:15 +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 1s9XP4-00Cn01-2c for pgsql-general@arkaria.postgresql.org; Tue, 21 May 2024 21:52:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s9XP2-00Cmzs-PD for pgsql-general@lists.postgresql.org; Tue, 21 May 2024 21:52:13 +0000 Received: from wfout2-smtp.messagingengine.com ([64.147.123.145]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s9XOx-001M00-SK for pgsql-general@lists.postgresql.org; Tue, 21 May 2024 21:52:11 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfout.west.internal (Postfix) with ESMTP id ED8DB1C00078; Tue, 21 May 2024 17:52:04 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 21 May 2024 17:52:05 -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=fm3; t=1716328324; x=1716414724; bh=TKnqHc1WeIa4zril8zNtPtjIhjAX4E2Dx4OG3QULZzI=; b= QNKgxBZU0s3Jgwy0Bewr8G9bpEnBzTQp2f+9H3yjtiZ20nAtM222ed0MUqrOknXW meWBewhFqEa2hEySayH8ISvXgbsDFMPAg4CSW6DHaTWnbmPk552xI3/4uVUI6Q0d FGBy3I6kdWVbRmyEmYfTsSkNz+AYv449IaPPt1SkUzfwJbvJ57R1NmbAmQ1UO+D6 /YRlEhX2W8Hev31EOhAWcayyI/I4EAOYFaybLKWd/FZKYdZXffTce0ZoxkacZHDm 7XRXq1OAgliUnxURMh9S/nFAbIVCvn4NbcEnCCW5DGL70rWRGBxsBdiZb1IhPC0h LEHG4WKaOjeMnXkNozkoRw== 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=fm1; t=1716328324; x= 1716414724; bh=TKnqHc1WeIa4zril8zNtPtjIhjAX4E2Dx4OG3QULZzI=; b=e ymIm8hdJR3c0pIuLEyV1vRRzLgcrHcgfXiHWLtrqY9dmYb7CmfU3dlN6KlLzQN81 DzKN/q3Lb5/SrQYWwx8zk8H56emQRmOhIBMgjupXr8hvlmwESbymKW8lxbjR/vUT giYoF/41dQFTZpraG7B/edXW9dFafo6lU/l9RjwtAIlUPQus1m4eON/c/ZZw8qzX GukeWpYT0n2ULt6p7WdZCv/Ozd9bVNuoa+JhM5Ed+nTbJs3Lg5/C3vMdgiUATlF4 T+QNdatRR9eNNeBenR002lm43hPiNxgs7CSp1EtwmWp4Q7u3vOYL32GvP9oXuplr Yue3GUB1hqe7z458fOleg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdeifedgtddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttddvjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeeivdfhieehheegueeileejieettdejhedugeefleek vdelkeehtdfgiefffeekudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 21 May 2024 17:52:03 -0400 (EDT) Message-ID: Date: Tue, 21 May 2024 14:52:03 -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: <4cab5b3f6b9b4e31803451c2fba836c4@uk.thalesgroup.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: <4cab5b3f6b9b4e31803451c2fba836c4@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/21/24 13:44, HORDER Philip wrote: > Classified as: {OPEN} > > 2024-05-15 03:31:31.290 GMT [4556]: [3-1] > db=lfm,user=superuser,app=[unknown],client=::1 LOG: connection > authorized: user=superuser database=lfm application_name=pg_restore > >> That would be the lfm database being restored. >> What does the log show after that as pertains to autovacuum? > > Yep, pg_restore recreates the dropped lfm database. > And after that.... nothing. > The log just holds connection requests, and a checkpoint every hour. > That's it. > No "automatic vacuum", or "automatic analyze" anywhere. > And nothing any day since then, for a week. Just for confirmation your settings are still?: autovacuum_max_workers = 10 log_autovacuum_min_duration = 0 You said previously: "The only way I can find of getting the analyzer back is to restart Postgres." To be clear this means: 1) The lfm database is dropped/created. 2) There is a round of autovacuum immediately after the lfm is restored. 3) autovacuum then goes silent. 4) Before the next drop/create lfm you restart the Postgres server and autovacuum starts again. What is in the logs when you do the restart? Is there some process that runs shortly after the drop/create lfm cycle? > > Phil Horder > Database Mechanic > -- Adrian Klaver adrian.klaver@aklaver.com