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 1uk8F6-00G6RS-KS for pgsql-bugs@arkaria.postgresql.org; Thu, 07 Aug 2025 21:33:44 +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 1uk8F3-00CglI-TI for pgsql-bugs@arkaria.postgresql.org; Thu, 07 Aug 2025 21:33:41 +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 1uk8F3-00CglA-Kg for pgsql-bugs@lists.postgresql.org; Thu, 07 Aug 2025 21:33:41 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uk8F1-001KJJ-05 for pgsql-bugs@lists.postgresql.org; Thu, 07 Aug 2025 21:33:41 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 577LXYHk1622269; Thu, 7 Aug 2025 17:33:34 -0400 From: Tom Lane To: depesz@depesz.com cc: 1986comatose@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19014: Automatic aggressive VACUUM on template0 and template1 pg_shdepend runs every minute In-reply-to: References: <19014-3b29e6cbcb5f0b82@postgresql.org> Comments: In-reply-to hubert depesz lubaczewski message dated "Thu, 07 Aug 2025 15:30:23 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1622267.1754602414.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 07 Aug 2025 17:33:34 -0400 Message-ID: <1622268.1754602414@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk hubert depesz lubaczewski writes: > On Thu, Aug 07, 2025 at 07:47:58AM +0000, PG Bug reporting form wrote: >> We only actively use the ecount database, yet our logs show that an >> automatic =E2=80=9Caggressive=E2=80=9D VACUUM is repeatedly running on >> template0.pg_catalog.pg_shdepend and template1.pg_catalog.pg_shdepend a= t >> roughly one-minute intervals. Since the template databases aren=E2=80=99= t used for >> normal operations, these vacuums seem unnecessary and are consuming sys= tem >> resources. We believe this behavior is a bug. > I bet you have some long transaction somewhere, and this table is shared > (same table visible in all databases). Another theory, again remembering this is a shared catalog, is that there is enough update traffic on pg_shdepend to justify constant vacuuming. That could be plausible if there's a lot of object creation and deletion going on (even just temporary tables, I think). Anyway, I don't see any such behavior here after setting log_autovacuum_min_duration =3D 0. We're going to need more information to reproduce the problem. regards, tom lane