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 1s7GHt-004dqW-Ci for pgsql-general@arkaria.postgresql.org; Wed, 15 May 2024 15:11:27 +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 1s7GHt-000g9f-9B for pgsql-general@arkaria.postgresql.org; Wed, 15 May 2024 15:11:25 +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 1s7GHr-000g2m-J2 for pgsql-general@lists.postgresql.org; Wed, 15 May 2024 15:11:24 +0000 Received: from wfout4-smtp.messagingengine.com ([64.147.123.147]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s7GHn-000LiU-SL for pgsql-general@lists.postgresql.org; Wed, 15 May 2024 15:11:22 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.west.internal (Postfix) with ESMTP id DE2E01C0007C; Wed, 15 May 2024 11:11:17 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 15 May 2024 11:11:18 -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=1715785877; x=1715872277; bh=nu2gvmZC+fl/13rWlSYkt52XBtzcmVgH9eipeoMYnMM=; b= AHFLVa4NTQ7P7vRf4Y3n4M3NgjNajm6tG/iYDwPa/84UrmIAEsKoTN9CsanAAHXO hIOL2UFNfr27x09WoyOd1y456Zv9DIdg9Llzarxi++KFMRK19v8DYMN6/kIix+5V daLLc1F7e0KX6eOCxuWLldXApwmooDdTKB6ir3oZiE/jBAEshpSrBT+Eaf/oH2LX Hr9zeuovSM/TvnbbS+LDjGyLWK/9bDqHPjfRbDizMGmeGYpv870uC4rCMrVPH+rq 84niaxPm6Nb74sWhLfhCaGcX2H06JVjJMwO5w7dXQF6rVJZ3k2svLZoSUd/qaeXR Eou+jSFQvglKCalm4AebJg== 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=1715785877; x= 1715872277; bh=nu2gvmZC+fl/13rWlSYkt52XBtzcmVgH9eipeoMYnMM=; b=N tHSTZwTIT+e5d+MKwI/n6Fa2C7YrzanAbgeP53/fK3q5fTGFDPL0c+w47UrCgh57 HB0yW39dE3ahWIl0mLMA1u/s5ylYrDoCCQW0vkZf4xtxTluEXj8WPD9Y96TT3QkT VR1+hmW/0cWrgT9vsRK6FWLc7EILNYl5dqdmC4gDG4ihuIsDncUJ8RlYnqWUtGNn dcqJqmB3rtP4C62CgkWWmidyPpkt80PV1oYT2byks4tftAC598ngAWeei1dv49lS W27hKrnSKDxFvTPi35d6MnrNz+MbJwJCDnptf+uyU2HE3H62TRhE+BZWcPnvzOth 5d8H+Zq0bm9p/2JuDrQSw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdegkedgkedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttddvjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeeivdfhieehheegueeileejieettdejhedugeefleek vdelkeehtdfgiefffeekudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 15 May 2024 11:11:16 -0400 (EDT) Message-ID: <76818cc5-7eaa-431b-af77-1f38a212bf1f@aklaver.com> Date: Wed, 15 May 2024 08:11:15 -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> <7c5b3f29-d82d-4cac-9aeb-8a4c0085ddf2@aklaver.com> <3d25cd915cd0433aa119728139fb0bdb@uk.thalesgroup.com> Content-Language: en-US From: Adrian Klaver In-Reply-To: <3d25cd915cd0433aa119728139fb0bdb@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/15/24 01:08, HORDER Philip wrote: > Classified as: {OPEN} > > Backups of this db are created with: > > pg_dump --file=fsm.dmp -Fc --blobs --oids --dbname=lfm --host=localhost --port=nnnn --username=superuser From your original post: "Running Postgres 15.3 ..." --oids have not been supported with pg_dump since v11 When I try it: pg_dump -V pg_dump (PostgreSQL) 15.7 (Ubuntu 15.7-1.pgdg22.04+1) pg_dump -d test -U postgres --oids -f test.sql /usr/lib/postgresql/15/bin/pg_dump: unrecognized option '--oids' So what version of pg_dump are you using? Or you not working on a v15 instance of Postgres? FYI, --blobs is only needed when dumping a specific table or schema, otherwise it happens by default. > > Restore is run with: > > dropdb --port=nnnn --maintenance-db=postgres --username=superuser --if-exists lfm > pg_restore -Fc --create --dbname=postgres --port=nnnn --username=superuser > fsm.dmp > > ------------- > >> 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. > > Log file extract is attached, with object names obfuscated. Still working my way through that. > > From yesterday, current stats for table a.accp, from pg_STAT_all_tables: > "811486381""airscape""accp"16458538988177871456553503047055581967135016364880294000"2024-05-14 14:51:37.158892+00""2024-05-09 08:27:45.328468+00""2024-05-14 13:15:31.999198+00"01815170101653 I can't parse this out well enough to really say anything. Though the timestamps seem to indicate recent activity. Using psql do \x select * from pg_stat_all_tables where relname = 'a.accp'; to get an extended output that is easier to read. > > This table has a low row count, but high content turnover. > It usually gets auto-analyzed every minute. > > For today, this hasn't been auto analysed since the update at 3am. > > >> 4) The autovacuum settings you have in effect: > > vacuum_cost_limit = 2000 > log_autovacuum_min_duration = 0 > autovacuum_max_workers = 10 > > all other vacuum settings are defaults. > > ------------ > > 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