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 1s2bNe-004Q8r-ES for pgsql-general@arkaria.postgresql.org; Thu, 02 May 2024 18:42:06 +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 1s2bNb-0033rX-Si for pgsql-general@arkaria.postgresql.org; Thu, 02 May 2024 18:42:04 +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 1s2bNa-0033rP-64 for pgsql-general@lists.postgresql.org; Thu, 02 May 2024 18:42:04 +0000 Received: from fout3-smtp.messagingengine.com ([103.168.172.146]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s2bNV-0017cz-5o for pgsql-general@lists.postgresql.org; Thu, 02 May 2024 18:42:01 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.nyi.internal (Postfix) with ESMTP id 4C6B2138025C; Thu, 2 May 2024 14:41:55 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 02 May 2024 14:41:55 -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=1714675315; x=1714761715; bh=FoRrdFwQAcpPubsp34MlB2BZuPeIZytqWaFF609vQmE=; b= uuzyVd/iN1dG13L2DfXhSZmUxvsjzvqmYPXFZfjUoS65tXmQ3WUhWN9vdD453whj 1GArmXvg6JyU+MfuJOHV4ukIl0ATFqf5KaYCkYdqmvpYQHacDSkojghbV6TwWg+6 NG6W+rabOlatkMy3LMeDFbrc7xo3lrANKUU2AHfHw0lMh0gkq0jWhAWJvEddpjxn rS4L0jqE9Pch74big8QQnJb/hUY8yCpLUda8ov3uMVfFSNxpf9+tq3rfMdk7BD8v b0oKEz2ormrwGqM3qEy3O1R5edc7FiexslUs5VdP1JN1nhxxHtWhRBAM4Ir+FdJn NjLh5Blypkjd+cruuUKKPA== 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=1714675315; x= 1714761715; bh=FoRrdFwQAcpPubsp34MlB2BZuPeIZytqWaFF609vQmE=; b=U VR2U3g4mejoCS0FHjH1UnrunbvbqrvetY5ER2BxnLpCdXyFSxx0sYevIvFVcIj9o mdYmvXHJ3hnsMebkxrIz3ZvYCTL+3PjEbIn4+xjTkEupvdFjR+sG7arVqhYCXMeZ Pz83P7kvapBK/qGzeg7p5jHMq3cIkqqUHAJ2CgyztFcOuvf92KgNIyNlkGpzIJr6 Srfab3J4cyRgtmbCUJHP/G5cau09y4suFRychcUocYD+aTu53JqbyIeugOWwJ7HZ Na4PWXLEai9R3S2iuvivZvw9ZlXlA/Vc0130+a2lJA2BlFhgiCJJ2+q4HbTiSI3C 9BmswQs2j+Ra/KhpusdOw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvddukedguddvlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfhfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuggftrfgrthhtvghrnhepuedvteekleeikeffgefgfeeggfegjedufedutedv jefhgffgiedthefghfdtheehnecuffhomhgrihhnpehpghgptggrthgrlhhoghdrphhgne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhi rghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 2 May 2024 14:41:54 -0400 (EDT) Message-ID: <4b64d2cc-1df6-4982-b842-39fb0d886731@aklaver.com> Date: Thu, 2 May 2024 11:41:53 -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> Content-Language: en-US From: Adrian Klaver In-Reply-To: <5910d4dcbe244548bbf482dad0ceca83@uk.thalesgroup.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 5/2/24 08:52, HORDER Philip wrote: > Running Postgres 15.3 with PostGIS 3.3 > > On Windows 10 (yes, I know) > > It’s a single node db with no replication, topping out at about 200GB. > > We have a schema (A) in the default 'postgres' maintenance database, > which our software services connect to, with one set of users (SU) This above is probably not a good idea, The 'postgres' database is generally taken to be a throw away database for establishing an initial connection. Many utilities/tools use it for that purpose, having your data in it exposes that data. > This works, some of the time. > > If I repeat the update process, somewhere around run #4 the auto > analyzer stops working, and only analyzes tables in the new db at the > point of reload, then shuts off again. > > All vacuum and analyze operations on the 'postgres' database just stops, > even though there is still data processing into it. Is there enough data processing? Autovacuum has thresholds for turning on, are you sure those thresholds are just not being met? > > With log_autovacuum_min_duration = 0, we are logging all vacuum & > analyze operations, so we can see when the entries shut off in the > Postgres log files, e.g. > > 2024-05-02 14:52:01.597 GMT [6896]: [23-1] db=,user=,app=,client= LOG: > automatic analyze of table "lfm.pg_catalog.pg_trigger" Except the above shows it working. What is the evidence it is not? > > The only way I can find of getting the analyzer back is to restart Postgres. Did you wait to see if activity after the pg_restore crossed the autovacuum thresholds? -- Adrian Klaver adrian.klaver@aklaver.com