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 1to7Bb-006HvK-2j for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Feb 2025 20:42:20 +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 1to7Bb-00Fd2l-SX for pgsql-hackers@arkaria.postgresql.org; Fri, 28 Feb 2025 20:42:18 +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 1to7Bb-00Fd2d-In for pgsql-hackers@lists.postgresql.org; Fri, 28 Feb 2025 20:42:18 +0000 Received: from mail-il1-x12b.google.com ([2607:f8b0:4864:20::12b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1to7BW-000EmV-2V for pgsql-hackers@lists.postgresql.org; Fri, 28 Feb 2025 20:42:17 +0000 Received: by mail-il1-x12b.google.com with SMTP id e9e14a558f8ab-3d3f1658a64so2077035ab.1 for ; Fri, 28 Feb 2025 12:42:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740775334; x=1741380134; darn=lists.postgresql.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=lmN1tUYlNqunTsOeEmq6bl8XP+v3+VuEFHyqNhzJV+4=; b=RwwfBVUcC0iFEwkGkkiglXWT/8pgChy1t83DHykEsyAWOehTOYRfCaX9GuLlIl6qy1 xf4a5BoBkoT0LrNIiR7de+fHobphWmT+yy46Whb2xWXSwzHVX7FtJMlXalpaJEFITQxI sGnOXwZu/UyJZaDPnFAJvl2CwRW9pyC2pUTC7BHax+wtUc6QN7tYBxkfOb7FW3K7DWW6 pXowsE8bwL4AMeDwmKtkbyqRfmAJT+S/nE/k1a3R89/O1Hh+ZDOjjjxQgOcwyXJOM++g Tpydf664oQsLXfqYrisUfwU1wlamD+g7OBlcPKqJD2UeW5Tb7t5alH9JhaaldiiNVgrT oYDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740775334; x=1741380134; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lmN1tUYlNqunTsOeEmq6bl8XP+v3+VuEFHyqNhzJV+4=; b=BR5lDHOctk7+R0g/J5Fm8z5GMRw7bNR4Oo/FTaUHHpviF7zYeTpW2GMFxiwTGXW+Oc IMTmJza9s9dSz+Nz0neRfZMI1Ctq2ZoalIKUzdA8i3vS7+5Zq/uiZAFxBEJrN4t8eS2X 36cCswhSXoy41XFUd+whGvG09DaxAAey/37tt9YKFDYVtlbvrWVjrNEiIkowxgEdQDbL Sga0WTCkmW/Y4iDK+rJkanK1jIhUxXy6UMdUGlKgysdSdFUM3RR1rxw8YzGpWM95+TGT Gbh6/FmUOK07vuV5Gjii5O7Z1idSX4R2JbgRFZ/8x/4U9jWsXowEoZdwYNQAzeE5W37D 7OIQ== X-Forwarded-Encrypted: i=1; AJvYcCV4eiafIYScVCfQyVg/nk2tLAn6DH7wsPbsBq6f5ebtyFuV5uRO5V1sQo2AzPCjCL7V0w/So1BH+atr47UT@lists.postgresql.org X-Gm-Message-State: AOJu0YxvAgD7rUC1GCEFpouvwh8FvXWdn/xHE8nAhhn25Fst67nqpiJg RxfIUmO3tiOOkGROpK3yO5KC65lpIARxuj6dxUqVWsdOGvf6qInf X-Gm-Gg: ASbGncuSfpODC0Gs3lvqzKmpValnzzaA1N4pZ+rM1vsghisxZC54lWYve7DCI0QB3Bd ts7T68x607xFI6lQiCBot/h7OeXeh+tqxAyqviJwh9804YbZCblK0k+MXk8votKedqGiDpjmqiY cADB/afPvQX9op+7Tj9NFEpqW9312lHaZ8s2gOq9iiNf0DpyPB9kkLie8OPo0YIBqfCkRU1V6sE jQgX59t2+gh/IDT26ilPI9OgEMuXha3RXxN5Wg8/eoExELSScwkc4SDhBAJc4jlalgnPFHlDKkV HOz8R+RuPaoJAuBdHwnHE8SaUC1j65Rqcp520oKgpuesRSCm+y9NAkZdjsu9Ea+ugWRJYsTFvdo VeQXc8XWyR7+ycp4nlVOulLFJ3BWHKDAvhoU= X-Google-Smtp-Source: AGHT+IFda0aVUNbduUzQLWsnXtOGJiTCrBKoGiR2yAI7OMvpWToTaWgA+nFbCL1tqesnZQ1DrYJ/HA== X-Received: by 2002:a05:6e02:214e:b0:3d3:e470:6d5 with SMTP id e9e14a558f8ab-3d3e6e70825mr46914585ab.13.1740775334269; Fri, 28 Feb 2025 12:42:14 -0800 (PST) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4f061f3905fsm1073261173.88.2025.02.28.12.42.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Feb 2025 12:42:13 -0800 (PST) Date: Fri, 28 Feb 2025 14:42:11 -0600 From: Nathan Bossart To: John Naylor Cc: Masahiko Sawada , Bruce Momjian , Jeff Davis , Corey Huinker , jian he , Matthias van de Meent , Tom Lane , Magnus Hagander , Stephen Frost , Ashutosh Bapat , Peter Smith , PostgreSQL Hackers , alvherre@alvh.no-ip.org Subject: Re: vacuumdb changes for stats import/export Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Feb 27, 2025 at 04:36:04PM +0700, John Naylor wrote: > On Wed, Feb 5, 2025 at 4:44 AM Nathan Bossart wrote: >> [v2] > > I started looking just at 0001, and it seems like a fairly > straightforward rearrangement. Thanks for taking a look. > I found this comment quite hard to read: > > + * 'found_objs' should be a fully qualified list of objects to process, as > + * returned by a previous call to vacuum_one_database(). If *found_objs is > + * NULL, it is set to the results of the catalog query discussed below. If > + * found_objs is NULL, the results of the catalog query are not returned. > + * > + * If *found_objs is NULL, this function performs a catalog query to retrieve > + * the list of tables to process. When 'objects' is NULL, all tables in the > > I had to read it several times before I noticed the difference between > "* found_objs" and "*found_objs". Maybe some extra spacing and breaks > would help, or other reorganization. Yeah, it's pretty atrocious. I think the main problem is that the interface is just too complicated, so I'll take a step back and see if I can make it more understandable to humans. In the meantime, here's an attempt at adjusting the comment: * found_objs is a double pointer to a fully qualified list of objects to * process, as returned by a previous call to vacuum_one_database(). If * *found_objs (the once-dereferenced double pointer) is NULL, it is set to the * results of the catalog query discussed below. If found_objs (the double * pointer) is NULL, the results of the catalog query are not returned. * * If *found_objs (the once-dereferenced double pointer) is NULL, this function * performs a catalog query to retrieve the list of tables to process. When * "objects" is NULL, all tables in the database are processed. Otherwise, the * catalog query performs a lookup for the objects listed in "objects". -- nathan