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 1vfiDu-004NPq-2Y for pgsql-admin@arkaria.postgresql.org; Tue, 13 Jan 2026 17:30:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vfiDt-005rMN-1v for pgsql-admin@arkaria.postgresql.org; Tue, 13 Jan 2026 17:30:29 +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.96) (envelope-from ) id 1vfiDs-005rME-2x for pgsql-admin@lists.postgresql.org; Tue, 13 Jan 2026 17:30:29 +0000 Received: from smtprelay0241.b.hostedemail.com ([64.98.42.241] helo=relay.b.hostedemail.com) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vfiDq-000Eun-1B for pgsql-admin@lists.postgresql.org; Tue, 13 Jan 2026 17:30:28 +0000 Received: from omf20.b.hostedemail.com (omf20 [10.200.6.83]) by unirelay02.b.hostedemail.com (Postfix) with ESMTP id C6980A3518; Tue, 13 Jan 2026 17:30:25 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: rmeyer@sevroconsulting.com) by omf20.b.hostedemail.com (Postfix) with ESMTPA id 8862980002; Tue, 13 Jan 2026 17:30:24 +0000 (UTC) MIME-Version: 1.0 Date: Tue, 13 Jan 2026 12:30:24 -0500 From: Rich Meyer To: Laurenz Albe Cc: =?UTF-8?Q?Gabriel_Guillem_Barcel=C3=B3_Soteras?= , Pgsql-admin Subject: Re: VACUUM/ANALYZE Strategy for Low-Activity PostgreSQL 15 Instance In-Reply-To: <002034bdb202a87b97de38648b0e35d8ac6db0ac.camel@cybertec.at> References: <002034bdb202a87b97de38648b0e35d8ac6db0ac.camel@cybertec.at> Message-ID: <0225023895511123aac84ea16daa1363@sevroconsulting.com> X-Sender: rmeyer@sevroconsulting.com Content-Type: multipart/alternative; boundary="=_d60229e29657416bce6f2d4432c78db8" X-Spam-Status: No, score=0.10 X-Stat-Signature: iqugwqtddfiphs8wn71afxpeure11sbg X-Rspamd-Server: rspamout06 X-Rspamd-Queue-Id: 8862980002 X-Session-Marker: 726D6579657240736576726F636F6E73756C74696E672E636F6D X-Session-ID: U2FsdGVkX1/VbrEeaz5AehLvPZ5ilz++TNSD6GbvZ6s= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sevroconsulting.com; h=mime-version:date:from:to:cc:subject:in-reply-to:references:message-id:content-type; s=dkim1; bh=ANghxBEPUncdnfRsGuMusZJ7XIzLTGOVZgIFMTEdBUQ=; b=pzAT/bKFbnEkdKjqxVN+0SvqR4ChIw9I4kAHAfYDlO9SEAAS0DFOhL2RJBXoeiXU2tI3AXjWF9/53Xdfo5spkrU6+kwC/ynUr4RdT5giJdIwwHVrbNDs1Ts2y6QL9paJhYUaOfiJ9GnMCyE82I508OdTK5iBiJ21YEj9wPKUtK0= X-HE-Tag: 1768325424-781513 X-HE-Meta: U2FsdGVkX1/RfWFOGHAF+GCGf9PuSMkInE+6PWSD9sI7/u6XvaVL/J5exEy44sY9KTq78ftAGTcXVY/VVo5w3ZK5MahDXGxI7d5Tiv2PvYR0uWZLb7Zp/b3jC8xcj3lVzurdd0QXA5DztG/Cr7wQR5bqrCGiQAFhaHxnE1SsQLGnorYTgpS6cFT/gm4v+ShfLh6luKlwAJLaG3K7xqbwp8bAdo6EA3QJnXPHMfwfrTAFYmOYh8jjcjWM2lWKsdTDBl/ca1jun1zIQGqfEZDvlcDgiQmQGa0Zah8ow255UrE40w0jAfObNzpt45+RxJQ+BT2qdnhCZE+nBcMM1skWCRihQewahdhCAn4NtyatT+SqkIkzVbkpcDI4OmI0Mfy7z9/QyUXefRkHPsb7TjNgSJIzySc+jepdDI2lSuA/cYXhbGgCZzhftAP/eyRhQixyT6Q1d0idIscazVh30iunvvtfYZXeaH3M9h98YtcCSQY= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --=_d60229e29657416bce6f2d4432c78db8 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8; format=flowed Hi, sorry about this but I cannot for the life of me unsubscribe from these emails. Can anyone help? --- Rich Meyer Sevro Consulting rmeyer@sevroconsulting.com 732-991-6249 On 2026-01-13 12:26 pm, Laurenz Albe wrote: > On Tue, 2026-01-13 at 08:19 +0000, Gabriel Guillem Barceló Soteras > wrote: > >> We have a healthy PostgreSQL 15 instance (installed from the official >> Postgres repository) >> running on Red Hat 9. It serves several databases for internal SMB >> applications. >> The environment is stable--apps perform well, disk usage is fine, and >> the system is not >> under heavy load. >> >> After integrating PostgreSQL into our monitoring system, I noticed >> warnings related to VACUUM >> and ANALYZE. Some tables have never undergone these maintenance >> operations, or the last run >> was 30-200 days ago. These databases have very few deletions, and many >> tables show no growth >> at all--typical 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? >> >> We're also monitoring table bloat, which is currently under 1%, >> suggesting that manual >> intervention may not be necessary and that autovacuum is doing its job >> when needed. > > I'd call this a false positive warning from the monitoring system, and > there 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.reltuples + 50 > (that would indicate that autovacuum doesn't trigger, is too slow or > cannot 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 --=_d60229e29657416bce6f2d4432c78db8 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8

Hi, sorry about this but I cannot for the life of me unsubscribe from th= ese emails. Can anyone help?


---
= Rich Meyer
Sevro Consulting
rmeyer@sevroconsulting.com
732-991-6249

On 2026-01-13 12:26 pm, Laurenz Albe wrote:

= On Tue, 2026-01-13 at 08:19 +0000, Gabriel Guillem Barceló Soteras w= rote:
We have a healthy PostgreSQL 15 instance (installed fr= om the official Postgres repository)
running on Red Hat 9. It serves s= everal databases for internal SMB applications.
The environment is sta= ble—apps perform well, disk usage is fine, and the system is not
under heavy load.

After integrating PostgreSQL into our monitor= ing system, I noticed warnings related to VACUUM
and ANALYZE. Some tab= les have never undergone these maintenance operations, or the last run
was 30–200 days ago. These databases have very few deletions, and ma= ny tables show no growth
at all—typical for internal SMB apps.I know this topic comes up often, but should I schedule a monthly VACUU= M + ANALYZE via a cron
or systemd timer, while still keeping autovacuu= m enabled?

We’re also monitoring table bloat, which is cur= rently under 1%, suggesting that manual
intervention may not be necess= ary and that autovacuum is doing its job when needed.

I'd call this a false positive warning from the monitoring system, an= d there is nothing
you have to do except to disable this test.  I= t 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 cannot make any
   progress owing = to long-running transactions)

b) whether age(pg_class.relfrozenx= id) exceeds 300 million
   (that would indicate a problem wi= th anti-wraparound autovacuum)

Yours,
Laurenz Albe

--=_d60229e29657416bce6f2d4432c78db8--