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 1tmITu-005ZTg-CD for pgsql-admin@arkaria.postgresql.org; Sun, 23 Feb 2025 20:21:42 +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 1tmITr-00Cofx-7b for pgsql-admin@arkaria.postgresql.org; Sun, 23 Feb 2025 20:21:39 +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.94.2) (envelope-from ) id 1tmITq-00Cofl-Sg for pgsql-admin@lists.postgresql.org; Sun, 23 Feb 2025 20:21:38 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tmITn-000M47-2O for pgsql-admin@lists.postgresql.org; Sun, 23 Feb 2025 20:21:37 +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 51NKLZpO1190572; Sun, 23 Feb 2025 15:21:35 -0500 From: Tom Lane To: Ron Johnson cc: Pgsql-admin Subject: Re: vacuumdb and a long list of tables In-reply-to: References: Comments: In-reply-to Ron Johnson message dated "Sun, 23 Feb 2025 13:09:21 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1190570.1740342095.1@sss.pgh.pa.us> Date: Sun, 23 Feb 2025 15:21:35 -0500 Message-ID: <1190571.1740342095@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Ron Johnson writes: > Is there any specific order by which "vacuumdb -t t1 -t t2 -t t3 ..." > processes those tables? A quick look at the source code finds appendPQExpBufferStr(&catalog_query, " ORDER BY c.relpages DESC;"); so apparently it's trying to process them in descending size order, although this doesn't account for indexes or toast tables. regards, tom lane