Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lrlyj-0002HT-Lg for pgsql-admin@arkaria.postgresql.org; Fri, 11 Jun 2021 18:34:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lrlyh-0004pX-NW for pgsql-admin@arkaria.postgresql.org; Fri, 11 Jun 2021 18:33:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lrlyh-0004pP-Er for pgsql-admin@lists.postgresql.org; Fri, 11 Jun 2021 18:33:59 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lrlye-00013i-Vd for pgsql-admin@postgresql.org; Fri, 11 Jun 2021 18:33:59 +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 15BIXn6N1972047; Fri, 11 Jun 2021 14:33:49 -0400 From: Tom Lane To: Nikhil Shetty cc: pgsql-admin@postgresql.org Subject: Re: vacuumdb idle processes In-reply-to: References: Comments: In-reply-to Nikhil Shetty message dated "Fri, 11 Jun 2021 23:28:23 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1972045.1623436429.1@sss.pgh.pa.us> Date: Fri, 11 Jun 2021 14:33:49 -0400 Message-ID: <1972046.1623436429@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Nikhil Shetty writes: > I have done a setup to run vacuumdb with 8 parallel jobs daily. It has been > running quite well. Apparently not all that well, if it failed to keep us out of an autovacuum-to-prevent-wraparound situation. I suppose you had autovacuum disabled because you thought this lashup was sufficient? > Just today I saw there is an aggressive autovacuum process running(to > prevent wraparound) on one of the table. vacuumdb which started later > spawned the 8 connections. One connection (doing vacuum on the table on > which an aggressive autovacuum is running) is waiting for "autovacuum(to > prevent wraparound)" to complete while the other 7 connections are just > sitting idle. > I am okay that one connection is waiting since an aggressive autovacuum is > running on that table but how come other connections have not released the > sesion yet? Any reason for this? Perhaps this is the last remaining table so vacuumdb has nothing else for them to do. regards, tom lane