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 1qajAd-00AE9n-CW for pgsql-general@arkaria.postgresql.org; Mon, 28 Aug 2023 20:49:11 +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 1qajAb-00Fpxw-D9 for pgsql-general@arkaria.postgresql.org; Mon, 28 Aug 2023 20:49:09 +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 1qajAb-00Fpxj-0z for pgsql-general@lists.postgresql.org; Mon, 28 Aug 2023 20:49:08 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qajAW-001bWe-Ts for pgsql-general@postgresql.org; Mon, 28 Aug 2023 20:49:08 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 5736A5C017D; Mon, 28 Aug 2023 16:49:01 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 28 Aug 2023 16:49:01 -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:sender:subject:subject:to:to; s=fm3; t= 1693255741; x=1693342141; bh=9zcJOr0r2BhSrVyr5YUIW3HNd+NUcIgeoBG jeD7hFyY=; b=RQcq4vmtjfv1kSLWm0Z+xS7+4hl7rzQ+Ku2ZV0lrN83bODRj8// lbrRd2hoN27rAv32klMtgZ5F5WEoVUM1Yevwe1G1HULZBEsS9KRXTzSgn1Z/pCiW 98EMAi0KGT4rTrGfOdKHDl6zI2VggWYssTqF+/JcOoHlNLc/OxsUZSw6zoQBsjf7 gUxL+I6nU+4FESWMIICu1qv76BlJu2clALL17we5Fc8ZDJ2ToRMmYDRMitN6RE6+ EeXlSGuyx70Oz7TO8qby15XfWe0qNSb+FwjtvP+eOusLTn55vOQsdmQWmknPlTDY FRz1k125aNBYt/D/N7TekEPGIEKjzW4esLg== 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:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1693255741; x= 1693342141; bh=9zcJOr0r2BhSrVyr5YUIW3HNd+NUcIgeoBGjeD7hFyY=; b=A 0/3M9O4c1+Jek9vybgCWYOGh2oQ5gaR5v+1gYPfHJ28Lx9XB4luHphfhCYZ9jPgc mlXP3xvKuiPbilmylMIf5+V5LDkynqKqQKeA1JRD9CxNNXtQGkof1gd6/1800drE TatRXgU11hSoekxK1XE+n51IUiHerYDqbkv0h2Lz/hj2hD3A1uMRw+7xRtS3G9pX NVglB+CkZ72F4Y9Bp3NJqEKpaeTs8k14O0k2lN9mnCDuN3IvQ3uUdF9RVFjJshqS dHNFCbByiwPJaAq/89SHGjGZF/cybBH9a/3JWYycjyXiie2N8fAvg3DwjrO7BGFp 2ebrn00RCuod1jM+rF7Zg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudefgedgudehudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfhfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuggftrfgrthhtvghrnhepleekgeejhfekteehfeduveetheeivdduheekudel teefvdffueehtddvgedtfeefnecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrgh enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughr ihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 28 Aug 2023 16:49:00 -0400 (EDT) Message-ID: Date: Mon, 28 Aug 2023 13:48:59 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: [INTERNET] Re: auto vacuum question Content-Language: en-US To: Alan Stange , pgsql-general General References: <41a740be-a8d7-b5c0-3054-c9bb7df4d362@aklaver.com> From: Adrian Klaver In-Reply-To: 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 8/28/23 13:19, Alan Stange wrote: > On 8/28/23 16:11, Adrian Klaver wrote: >> On 8/28/23 13:06, Alan Stange wrote: >>> All, >>> >> Are you sure that is coming from autovacuum? >> >> What are the log lines preceding the WARNING? >> >> What is the complete warning line? > Thank you for your quick response. > > The prefix to the logfile lines are a datetime stamp and then a number, > 2062375 in the example that I happen to be looking at now. > > I am 99.9% that these log lines came from the autovacuum, as it went on > for days, whereas a regular vacuum on our multi-TB data base takes a > couple of hours.   We don't have any explicit vacuum or analyze jobs > running or scheduled. I went back to the source for a refresher: https://doxygen.postgresql.org/autovacuum_8c_source.html The autovacuum system is structured in two different kinds of processes: the autovacuum launcher and the autovacuum worker. The launcher is an always-running process, started by the postmaster when the autovacuum GUC parameter is set. The launcher schedules autovacuum workers to be started when appropriate. The workers are the processes which execute the actual vacuuming; they connect to a database as determined in the launcher, and once connected they examine the catalogs to select the tables to vacuum. ... Connect to the selected database, specifying no particular user I read that as the autovacuumn process runs directly from the backend and not as any user. Therefore it should not be running into a user permissions problem. 1) Is this the community version of Postgres? 2) Did you do any other changes when you altered the superuser? 3) Did the log lines before the Warning have anything useful? 4) Are you sure there is not some admin app running that is doing VACUUMs? > > Alan > > >> >>> We restored the superuser role to the original 'red' login role and >>> these messages went away. >>> >>> We are not running any explicit vacuum's.    As far as I can tell, these >>> warnings were comming from the autovacuum processes, and we did also >>> notice that some query stats became stale which I assume is related to >>> these same warnings. >>> >>> >>> So, I'm wondering how we can move the superuser role from role A to B, >>> so that the autovacuum process will still work?   I googled around a >>> bit, but didn't come up with anything useful for this. >>> >>> Thank you, >>> >>> Alan >>> >>> > > > -- Adrian Klaver adrian.klaver@aklaver.com