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 1vfiAP-004Mty-0i for pgsql-admin@arkaria.postgresql.org; Tue, 13 Jan 2026 17:26:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vfiAO-005nzA-1E for pgsql-admin@arkaria.postgresql.org; Tue, 13 Jan 2026 17:26:52 +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 1vfiAO-005nz2-01 for pgsql-admin@lists.postgresql.org; Tue, 13 Jan 2026 17:26:52 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vfiAM-000Goo-0g for pgsql-admin@lists.postgresql.org; Tue, 13 Jan 2026 17:26:51 +0000 Received: by mail-wm1-x343.google.com with SMTP id 5b1f17b1804b1-47d59da3d81so237945e9.0 for ; Tue, 13 Jan 2026 09:26:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1768325207; x=1768930007; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=dM0J7nu0iH1hi+rj7O9jTO/Ia7/fV2KrU+zATqTvdEc=; b=OgmVHwgPp0VKbWiDFM1C3bYGGZZUrT4EwGr3ln51MWQlwewIQmdNZtUbNVBIeRq56l c0P8IuFmg2Uxe9FOuyxf2NYewcUsw3wf8g2NFe7hzMga9XIWuS5YDh/tlNpw/euR1Pl0 D2bYEr95ku8hfH3vXLEalDKyAzB6A3n9n2/cFILPDn/gU0eTHbB05/teukSMAPvymflE +TQ5VABaZ5zNbfSInn7XUJ2ZzIbL4+qyvY59l/hlwpFbhnKzmHKO+EvGJZs30bfkO1tT GTHywEV7ZleF7RQhMQ5BrpH+O8aZPLZJQ1u7LM9h964VZ3TVR5x/tCIYG58irMb/zHPL JAwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768325207; x=1768930007; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dM0J7nu0iH1hi+rj7O9jTO/Ia7/fV2KrU+zATqTvdEc=; b=dc3sDMk7anYr3pCy4/N/onS02xFFOBYzL+/eATqlG/W1c8qwtoTt4xuz+yMy90kinG 41tW4Ml3vhi+dJDNGhDnG8I8Cj/5WdBaVXoYLDTnXCVxd/d4pwXYutF4LWSHy0FGduJd pqU2/X5ZOtoSUi3hL8UjAp5wt3v1KYlUdGz07HxTkvBtJSsF6q8bo1EmKgiE/KgfzlTu tXRm58Drb50JryDBYtUHZfwyvtuKJA/U2BJm9tu3MWZAcf8+zDC+pUeiISxP9zeRs6YY nURtOAASoUdndtQYpgfxY12j+8YFwQkAacDJ8/wwcsvJF9PmxBuNVQbev+ajI5FQkIy3 nQ+g== X-Forwarded-Encrypted: i=1; AJvYcCV656xbtm6tnhTR6z5DTtGGxpaW7YhhEMi0VCp7UZ9aJLHHC5LGjVilCpIRlX6dsMvRib+qXkzpVYGA7w==@lists.postgresql.org X-Gm-Message-State: AOJu0Yx94iD2BCHbR2nsqlaGbPP0KBLymPCb8TtTP+8Z0CL/VZh2NAZl mql+e24giOQBFgwKNQTQR5hhzmOFWmiiZD5ThcnLmnA6aCQ3Kdb08YDO2snDK+s78Dw= X-Gm-Gg: AY/fxX6JKUEAkiHt6gKC4MHJFKzobhyVxzbGsQoaatknZ+r0JBNSgxVUM6YAshwf0nr nv9F2GEPXb6ofi3BugmoQRHVo6hYQ37fk0vBMWtztNVE9MI+RuONnwSZODu8LYbuox5CQif2mj/ JDGekGSMtravdE5UaYw6iHQr43ydevNUwPdJnDJbztIySDv5hm4T8acG7+igsrsRwiIbI9q3tIa HbpF7ghKge5BRugjo1pc4sMI689xASaM3Tr1ChMNl4rTj3Uad3pZ3gz0Fu+iHuchd5dao2FVGWL YhbSsdA3ySdBNLNHiFSm8mlMYjjsFQw3T/JLu5BtxslP16rkh0P6Rt++gbZT6N6K8Te1POFexzB eo7RX8E9K7cK6VveSm+2ejcXvshvcryMxbFjwmOJ+OfQm131VTMZisE47tnkbQLaxMgDaAAmAzu +Q61zs5oLU2b4cTOE0/+7IapWXFogpUQgO4DzBLHPQ X-Received: by 2002:a7b:c00b:0:b0:477:9a61:fd06 with SMTP id 5b1f17b1804b1-47ed7c062famr39942605e9.8.1768325207017; Tue, 13 Jan 2026 09:26:47 -0800 (PST) Received: from laurenz.albe-K4N0CV00F97414D ([46.151.204.202]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-432bd5ff319sm46180743f8f.43.2026.01.13.09.26.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jan 2026 09:26:46 -0800 (PST) Message-ID: <002034bdb202a87b97de38648b0e35d8ac6db0ac.camel@cybertec.at> Subject: Re: VACUUM/ANALYZE Strategy for Low-Activity PostgreSQL 15 Instance From: Laurenz Albe To: Gabriel Guillem =?ISO-8859-1?Q?Barcel=F3?= Soteras , Pgsql-admin Date: Tue, 13 Jan 2026 18:26:46 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.2 (3.58.2-1.fc43) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 2026-01-13 at 08:19 +0000, Gabriel Guillem Barcel=C3=B3 Soteras wro= te: > We have a healthy PostgreSQL 15 instance (installed from the official Pos= tgres repository) > running on Red Hat 9. It serves several databases for internal SMB applic= ations. > The environment is stable=E2=80=94apps perform well, disk usage is fine, = and the system is not > under heavy load. >=20 > After integrating PostgreSQL into our monitoring system, I noticed warnin= gs related to VACUUM > and ANALYZE. Some tables have never undergone these maintenance operation= s, or the last run > was 30=E2=80=93200 days ago. These databases have very few deletions, and= many tables show no growth > at all=E2=80=94typical for internal SMB apps. > I know this topic comes up often, but should I schedule a monthly VACUUM = + ANALYZE via a cron > or systemd timer, while still keeping autovacuum enabled? >=20 > We=E2=80=99re also monitoring table bloat, which is currently under 1%, s= uggesting that manual > intervention may not be necessary and that autovacuum is doing its job wh= en needed. I'd call this a false positive warning from the monitoring system, and ther= e is nothing you have to do except to disable this test. It is perfectly healthy for a = table with few updates and deletes to ve autovacuumed very rarely. What you should monitor is a) whether pg_stat_all.tables.n_dead_tup is much more than 0.2 * pg_class.r= eltuples + 50 (that would indicate that autovacuum doesn't trigger, is too slow or can= not make any progress owing to long-running transactions) b) whether age(pg_class.relfrozenxid) exceeds 300 million (that would indicate a problem with anti-wraparound autovacuum) Yours, Laurenz Albe