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 1s9o3M-005H6L-JA for pgsql-general@arkaria.postgresql.org; Wed, 22 May 2024 15:38:57 +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 1s9o3M-000ggY-FT for pgsql-general@arkaria.postgresql.org; Wed, 22 May 2024 15:38:56 +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 1s9o3M-000ggQ-4x for pgsql-general@lists.postgresql.org; Wed, 22 May 2024 15:38:56 +0000 Received: from wfhigh8-smtp.messagingengine.com ([64.147.123.159]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s9o3H-000DuH-B2 for pgsql-general@lists.postgresql.org; Wed, 22 May 2024 15:38:55 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfhigh.west.internal (Postfix) with ESMTP id E24BC1800129; Wed, 22 May 2024 11:38:48 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 22 May 2024 11:38:49 -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=1716392328; x=1716478728; bh=nd9DOCOFY5VFB7UIiD4UlbjyVIAUtk6md2M48Psq0xo=; b= eVD3UIdlgXYdQlsNzqprCovbPtDLkwPb9HRi1OvTz6FdeDoMoyEA7BPiJkQ0/lyl 13cMk73kOLJJTjKPPZWP3+o5FsUuH8LKIW5QlajEJ7QsswgrKSxv7lJcRP0m7rHt AB6psne41kaLEnohoZ8v6EUhz8uvFsYHY5VDhPLJLAwJhfza7/vnf7yy1K2Kn4cg lcUc1lTN+pCilSmCnDuxUBKLqBIIEEMEOJ/fuUFQSbHCx4mGlfqHOODMZotC14Xo FK0IwkfMJlV1UN5v4R1HJ/z0q10HN5BFEEnNcSkB2mTHA+jUnn+IyE23qqZfLBWT 65vxjhYGUS5FN9Z+uBmesg== 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=1716392328; x= 1716478728; bh=nd9DOCOFY5VFB7UIiD4UlbjyVIAUtk6md2M48Psq0xo=; b=U mn+MpBPD9FcuBQ6ehJxxUgy/n5V78EdrtNKTMH6e6zXGjN3v42fwMmBEF+d+WOaG h1EfmVo4/FX4cGuW2tH+KPMS312opj1x9EP/7LamhoXKcpIE0ddPYN+UiiysU1xZ 9/Lj9yXaHyeZtZLkOewYXRL4EsgPth55QUE+sIKTK6hRjgOtt18Db3Jr0FFTkP27 ozi78x84yecUtD6JdAbFL9lp158OrgjRViytG3UTra0WwxxplmQTxbhwVOn4SRhw g/ubAfXhJ/b+GtHg9+J1GrYmmmfS3sIHnEgOMQWRIszRrj7jerxfhtCnDC1g3Fly dDW2r6v/f+t4+E7iMCLVQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdeigedgvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttddvjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeekfeehuddvjeeigfeifeejtdduudffledvfeelheef tdeiffeugfdvkeelgedtvdenucffohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhi rghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 22 May 2024 11:38:47 -0400 (EDT) Message-ID: Date: Wed, 22 May 2024 08:38:47 -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/22/24 01:33, HORDER Philip wrote: > Classified as: {OPEN} >> 2) There is a round of autovacuum immediately after the lfm is restored. > Yes, some tables in the lfm database, but not all, an apparently random selection, anywhere between 2 and 21 tables, across the lfm schemas, public & pg_catalog. > >> 3) autovacuum then goes silent. > Yes. Dead in a ditch. But with no errors. > >> 4) Before the next drop/create lfm you restart the Postgres server and autovacuum starts again. > I haven't restarted in a week, and the pattern remains, with a bit of analyze at each reload of lfm, and then nothing. > >> What is in the logs when you do the restart? > Nothing notable: > 1) denied connections, while restarting > 2) authorized connections > 3) auto analyze going into overdrive: > See below > >> Is there some process that runs shortly after the drop/create lfm cycle? > Not that I can see. I was hoping more coffee would lead to enlightenment, it did not. It did lead me to do what I should have done at the start which is look at the release notes for 15.x. You are on Postgres 15.3 and current is 15.7. On the path from .5 --> .7 is: https://www.postgresql.org/docs/15/release-15-5.html#id-1.11.6.7.4 Fix race condition in database dropping that could lead to the autovacuum launcher getting stuck (Andres Freund, Will Mortensen, Jacob Speidel) The race could lead to a statistics entry for the removed database remaining present, confusing the launcher's selection of which database to process. > Phil Horder > Database Mechanic -- Adrian Klaver adrian.klaver@aklaver.com