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.96) (envelope-from ) id 1vJFaZ-00GEQf-1O for pgsql-admin@arkaria.postgresql.org; Wed, 12 Nov 2025 18:29:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vJFaX-00DXsj-0M for pgsql-admin@arkaria.postgresql.org; Wed, 12 Nov 2025 18:29:01 +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.96) (envelope-from ) id 1vJFYh-00DTlB-2R for pgsql-admin@lists.postgresql.org; Wed, 12 Nov 2025 18:27:08 +0000 Received: from fhigh-a7-smtp.messagingengine.com ([103.168.172.158]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vJFYe-007O9i-1s for pgsql-admin@lists.postgresql.org; Wed, 12 Nov 2025 18:27:07 +0000 Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id EACEE140021B; Wed, 12 Nov 2025 13:27:01 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Wed, 12 Nov 2025 13:27:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm2; t=1762972021; x= 1763058421; bh=8FUXHQaqbeDqvRXRKeyXm3EOb+SgABqCT28yNz2TZd0=; b=Q 45JcyJBVHSvQ0hcUkzkMLkCtENBNb53J5NG2uwsy6zhsuekHsSRAe3SN696aqFNj CsTvibqWSLAzwQ0Yfy54m9NNup3gUieR7J+CtJTrWQ54OwFIthiKWcn+w02vN/Sb 8ITLRyRyI3Jc8t+TaN0FeLbB9U+ZLmyo3k52Gk8GzVO6kXdpqkGn3bUGT0OmFeqj gFfQWojpB6AocxnCRi6z7D/PLX3Oeiazvjp7vFw1tTmYJ5FDSfDpCo6khA/zZ4LL lGQ65vgWPKK0My0wK+Okn5ptnsczbGB7QD2ZDItfS3yQLVkNFzZr8Ij6NJv0LV/u z78wM9rm3Cgb1OFIiMZwQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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 :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1762972021; x=1763058421; bh=8 FUXHQaqbeDqvRXRKeyXm3EOb+SgABqCT28yNz2TZd0=; b=Ux91ddwPvN8t6wGM9 NO9aIUetqqkDZh8TZt4/0FBp46gf/70H1eyWNQpe4EQl2RWbQHm6SJt7vbQ8QWl0 bypv2NGR/oqi8r727Xj3TD8k5mcvpWLF+/qDJr0pW8Rgf83wCW6SGndsIZUxud0j FdIjoFaaky/Joy7bvcn4DPVSQdaPkMY0XZkgyugLqWOXZPU1YeXeCuuykR410Fss fjeNsrMxUYG/+CmKcIyQBmN21ygatSJk1hRN10TDECJM3949DxA7Mwjv8WpDvnIT 4Jc2qRGCPz4ZermS0nI/QBD5yyHfIXQo8bHKpCEUoXM1V0L2MFfu5RR37U+sFC7L y5kIg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddvtdegjeelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpeffhffvvefukfggtggugfgjsehtkeertd dttdejnecuhfhrohhmpemllhhvrghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvges khhurhhilhgvmhhurdguvgeqnecuggftrfgrthhtvghrnhepteeuvdehffekvefgueehve etveekgfegtddtueefueehuddutdfhfeffhfejfeffnecuffhomhgrihhnpegvnhhtvghr phhrihhsvggusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegrlhhvhhgvrhhrvgeskhhurhhilhgvmhhurdguvgdpnhgspghrtghp thhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepphhgshhqlhdqrggumh hinheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhgpdhrtghpthhtohepshgsohgs sehquhgrughrrghtuhhmqdgsrhgrtggtrghsrdgtohhm X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 12 Nov 2025 13:27:01 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1762972019; bh=nOQtIOnQPO1uXYef1jboiC8Vo6SdIRS0QyrBV8PbnHI=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=OtHE4ebqWBLume2eyewg3lTucWH9v/EeMx0uEBbYqI9e4VZCwFHqoYYB9ZeFGQegk JHFyGsNWkYzPwlUxUTzmBQEuEW5/ypYjyL1b3ZjSMcwFwJ/yu5otGQZNemdQwDqUvW 0lDMDYKAoViwTnSaKV6rCFS4wcs85gW95Bw2Ow7HpoTuQGcAO+Px5Klmv+wWlH7heR Qbs4WehUttF7Od5wWRPij/5tYdhEG8BvyWOz2wz7Xx3eqwSZ7U9WXzIdN1Mjc34kUT kxvEQrcNfZwYew6LlsdxTHDpYROJSYxCyQ1Rt5WPcmiC32t0WYAf4H95T3uqFkNJan W2WKNrUF92Ykw== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id 5B74276; Wed, 12 Nov 2025 20:26:59 +0200 (EET) Date: Wed, 12 Nov 2025 19:26:59 +0100 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Sbob Cc: pgsql-admin@lists.postgresql.org Subject: Re: vacuum process running for more than 2 days, still in scanning heap phase Message-ID: <202511121819.yuoha4w6sprz@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <0a1745be-c54d-43b9-a90f-71e4c721c17c@quadratum-braccas.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025-Nov-12, Sbob wrote: > We have a vacuum process that has been running for 2 days, the table > is 12GB in total size and vacuum_cost_delay is at 0 Is it autovacuum? Because if so, the autovacuum_vacuum_cost_delay setting would be used instead of this one. Also check the table config (\d+) in case there are autovacuum settings there, which could make vacuum slower on this particular table. What PG version again? > heap_blks_total    | 571437 > heap_blks_scanned  | 344577 > heap_blks_vacuumed | 0 > index_vacuum_count | 0 > max_dead_tuples    | 155388267 > num_dead_tuples    | 199013 Yeah, this seems really slow. Maybe have a look at the wait events in pg_stat_activity to see if you can figure out what is holding it back. > We actually tried a pg_terminate_backend on it and it does not die Hmm, maybe there's something going wrong with it. I've seen corrupted btree indexes make a vacuum go into infinite loops because of loops in the index structure. I would take a few backtraces with gdb or such. Maybe if an index is corrupt in that way, it would also explain why it doesn't interrupt. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Cómo ponemos nuestros dedos en la arcilla del otro. Eso es la amistad; jugar al alfarero y ver qué formas se pueden sacar del otro" (C. Halloway en La Feria de las Tinieblas, R. Bradbury)