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 1uQKxW-0091dQ-5F for pgsql-hackers@arkaria.postgresql.org; Sat, 14 Jun 2025 07:05:46 +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 1uQKxU-007QEs-7f for pgsql-hackers@arkaria.postgresql.org; Sat, 14 Jun 2025 07:05:44 +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 1uQKxT-007QEc-Ua for pgsql-hackers@lists.postgresql.org; Sat, 14 Jun 2025 07:05:44 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1uQKxR-001v5F-30 for pgsql-hackers@postgresql.org; Sat, 14 Jun 2025 07:05:43 +0000 Received: from [192.168.11.9] (p1696134-ipoe.ipoe.ocn.ne.jp [118.0.93.133]) by oss.nttdata.com (Postfix) with ESMTPSA id B9280613DD; Sat, 14 Jun 2025 16:05:36 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com Message-ID: <94f89b0a-5d83-4a67-9092-50ba3913441c@oss.nttdata.com> Date: Sat, 14 Jun 2025 16:05:36 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: pg_dump --with-* options To: Nathan Bossart , Jeff Davis Cc: Robert Haas , Peter Eisentraut , pgsql-hackers References: <7cc52488-f876-4ad3-affd-6e4b0ef0cb09@eisentraut.org> <1854ffbf-f8eb-4bc3-b9f8-223bbf58c392@oss.nttdata.com> <271f899c54d112b353e009286af7c6cdb7c3d609.camel@j-davis.com> Content-Language: en-US From: Fujii Masao In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025/06/14 5:32, Nathan Bossart wrote: > On Fri, Jun 13, 2025 at 08:58:04AM -0700, Jeff Davis wrote: >> On Fri, 2025-06-13 at 09:39 +0900, Fujii Masao wrote: >>> By the way, if we keep --with-statistics in pg_dump, are we planning >>> to >>> continue using the --with-xxx naming pattern for new options that >>> specify extra data to dump? >> >> Good point. Now that we are getting rid of some of the other options, >> we don't need to worry about consistency with them, and I think we >> should just use "--statistics". > > +1 +1 I noticed that --statistics (i.e., the current --with-statistics) causes statistics to be dumped even when used with --data-only or --schema-only. So, as far as I understand, here are the possible combinations of dump targets and options: schema, data, stats: --statistics schema, data: (default) schema, stats: --schema-only --statistics data, stats: --data-only --statistics schema only: --schema-only data only: --data-only stats only: --statistics-only This makes me wonder if --no-data and --no-schema are still necessary. They were also introduced in v18, but might now be redundant. If so, should we consider removing them? If we do keep them, we could also use --no-schema --statistics to dump data and statistics, but I find --data-only --statistics more intuitive. Regards, -- Fujii Masao NTT DATA Japan Corporation