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 1uPsSg-0003DC-Hr for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Jun 2025 00:40:02 +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 1uPsSe-00HAnr-M1 for pgsql-hackers@arkaria.postgresql.org; Fri, 13 Jun 2025 00:40:01 +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 1uPsSe-00HAnj-C0 for pgsql-hackers@lists.postgresql.org; Fri, 13 Jun 2025 00:40:01 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uPsSc-001jOz-2c for pgsql-hackers@postgresql.org; Fri, 13 Jun 2025 00:40:00 +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 DB83160676; Fri, 13 Jun 2025 09:39:54 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com Message-ID: <1854ffbf-f8eb-4bc3-b9f8-223bbf58c392@oss.nttdata.com> Date: Fri, 13 Jun 2025 09:39:54 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: pg_dump --with-* options Content-Language: en-US To: Nathan Bossart , Robert Haas Cc: Peter Eisentraut , pgsql-hackers , pgsql@j-davis.com References: <7cc52488-f876-4ad3-affd-6e4b0ef0cb09@eisentraut.org> From: Fujii Masao In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025/06/12 23:52, Nathan Bossart wrote: > On Thu, Jun 12, 2025 at 10:18:56AM -0400, Robert Haas wrote: >> On Fri, Jun 6, 2025 at 11:40 AM Nathan Bossart wrote: >>> On Fri, Jun 06, 2025 at 09:14:32AM +0200, Peter Eisentraut wrote: >>>> What is the purpose of the --with-data option? Dumping the data is the >>>> default. Is this to override an earlier --no-data option? >>> >>> I believe the idea is that these will allow folks to be explicit about what >>> they want instead of needing to understand the defaults for every >>> component. >> >> Am I too late to propose ripping this out? >> >> I mean, if I look at pg_dump --help and there are options for >> --with-broccoli and --without-mushrooms, I know that the defaults are >> no brocooli, yes mushrooms, and I know which options I need to specify >> to get the behavior that I want, whatever that happens to be. If all >> options exist in both forms, it's a lot more confusing. Maybe there's >> some issue of cross-version compatibility here that justifies this >> complexity, but I don't see what it would be. I would think >> --with-data has always been the default and always will be, so we just >> don't need --with-data for anything. But maybe I'm confused. > > If the idea is to remove all options for default behavior, we'd be removing > --no-statistics, --with-data, and --with-schema at this point. WFM. Regarding pg_restore, since --with-statistics is already the default, we should remove it from pg_restore. 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? I just wondered because pg_dump already has other naming styles like --sequence-data, --include-foreign-data, and --large-objects. Regards, -- Fujii Masao NTT DATA Japan Corporation