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 1vfcjo-003UWb-34 for pgsql-admin@arkaria.postgresql.org; Tue, 13 Jan 2026 11:39:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vfcjo-004Ycj-0T for pgsql-admin@arkaria.postgresql.org; Tue, 13 Jan 2026 11:39:04 +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 1vfcjn-004YcY-1s for pgsql-admin@lists.postgresql.org; Tue, 13 Jan 2026 11:39:04 +0000 Received: from mail2.pscs.co.uk ([178.159.10.131] helo=mail.pscs.co.uk) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vfcjk-000CsU-1l for pgsql-admin@lists.postgresql.org; Tue, 13 Jan 2026 11:39:03 +0000 Authentication-Results: mail.pscs.co.uk; spf=none; auth=pass (cram-md5) smtp.auth=pscs Received: from lmail.pscs.co.uk ([192.168.120.1]) by mail.pscs.co.uk ([192.168.120.185] running VPOP3) with ESMTPA for ; Tue, 13 Jan 2026 11:38:57 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pscs.co.uk; q=dns/txt; s=lmail; h=Content-Type:Message-ID:Date:MIME-Version:Subject:To:References:From :In-Reply-To:Cc:Content-Transfer-Encoding:Reply-to:Sender; t=1768303718; x=1768908518; bh=/1/fm8k36rMyaSNDkuhxNfXiqENcf/n2yqXG9rLGqSM=; b=QEtUXYF9tcmtimwGuUXzV8/tQhM2jpED84OqGKsVkiJOhBUT1yH5LtQ/q/XsShjHhYGVRR/+ i2fIMDfyPN9EslJ8IKwRa5sNTMi7QKgiCP9dzFo+HgeWcaGGYg5h7drVfrnZ1wC14Q70HdebGT B6DjCAFZZkO7bX9gaDXq+VTis= Authentication-Results: lmail.pscs.co.uk; spf=none; auth=pass (cram-md5) smtp.auth=paul Received: from [192.168.57.71] ([217.155.111.120] (217-155-111-120.dsl.in-addr.zen.co.uk)) by lmail.pscs.co.uk ([192.168.120.70] running VPOP3) with ESMTPSA (TLSv1.3 TLS_AES_256_GCM_SHA384) for ; Tue, 13 Jan 2026 11:28:38 -0000 Content-Type: multipart/alternative; boundary="------------uEDMZyzXABEeF7UrAUm00j9j" Message-ID: <05e54ad2-0d6b-49b0-834a-4107fee68c51@pscs.co.uk> Date: Tue, 13 Jan 2026 11:28:37 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: VACUUM/ANALYZE Strategy for Low-Activity PostgreSQL 15 Instance Content-Language: en-GB To: pgsql-admin@lists.postgresql.org References: <81c12173-6da4-43e9-866a-00321a00415a@pscs.co.uk> From: Paul Smith* In-Reply-To: X-Authenticated-Sender: paul X-Server: VPOP3 Enterprise V8.7 - Registered X-Organisation: Paul Smith Computer Services X-VPOP3Tester: 12 345 X-Authenticated-Sender: pscs List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------uEDMZyzXABEeF7UrAUm00j9j Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 13/01/2026 11:09, Gabriel Guillem Barceló Soteras wrote: > > CheckMK, as Anton case, monitors several metrics with a PostgreSQL > integration  . In this case is last > vacuum and analyse . > It generates a monitoring item with pre-populated thresholds. > > You are not wrong at all. The/ lazy admin problem /is that adjusting > monitoring system on per-table basis is very time consuming, compared > with  a weekly manual vacuum + analyze that makes 'no harm' out of > business hours. I think i will go the weekly vacumdb route, or I will > have to deactivate VACUUM and ANALYSE monitoring items. > OK As you say, it does no harm, so you could do that, but I'd argue that it's also unnecessary. Personally, I'd disable those vacuum & analyze monitors. 'last autovacuum' and 'last autoanalyze' are a bit more useful monitoring stats than last manual vacuum/analyze, unless you have a company policy mandating otherwise. Even then, I've just looked at one of our databases that's been running since 2019, and the 'last vacuum' AND 'last autovacuum' times are still null for a lot of the tables. It's simply unnecessary to vacuum those tables, or even analyze them, as they just hold a few rows of data that rarely change. I'd say you're better monitoring other metrics, eg "n_mod_since_analyze" & "n_dead_tup", to see if vacuum/analyze is necessary for that table. That will show if autovacuum/analyze isn't keeping up with the job. Paul --------------uEDMZyzXABEeF7UrAUm00j9j Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
On 13/01/2026 11:09, Gabriel Guillem Barceló Soteras wrote:

CheckMK, as Anton case, monitors several metrics with a PostgreSQL integration . In this case is last vacuum and analyse. It generates a monitoring item with pre-populated thresholds.

You are not wrong at all. The lazy admin problem is that adjusting monitoring system on per-table basis is very time consuming, compared with  a weekly manual vacuum + analyze that makes 'no harm' out of business hours. I think i will go the weekly vacumdb route, or I will have to deactivate VACUUM and ANALYSE monitoring items.

OK

As you say, it does no harm, so you could do that, but I'd argue that it's also unnecessary. Personally, I'd disable those vacuum & analyze monitors. 'last autovacuum' and 'last autoanalyze' are a bit more useful monitoring stats than last manual vacuum/analyze, unless you have a company policy mandating otherwise.

Even then, I've just looked at one of our databases that's been running since 2019, and the 'last vacuum' AND 'last autovacuum' times are still null for a lot of the tables. It's simply unnecessary to vacuum those tables, or even analyze them, as they just hold a few rows of data that rarely change.

I'd say you're better monitoring other metrics, eg "n_mod_since_analyze" & "n_dead_tup", to see if vacuum/analyze is necessary for that table. That will show if autovacuum/analyze isn't keeping up with the job.

Paul

--------------uEDMZyzXABEeF7UrAUm00j9j--