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 1uhD2F-00BkIn-1i for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Jul 2025 20:04:24 +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 1uhD2D-00CaO7-Vj for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Jul 2025 20:04:22 +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 1uhD2D-00CaNZ-DR for pgsql-hackers@lists.postgresql.org; Wed, 30 Jul 2025 20:04:21 +0000 Received: from fhigh-b5-smtp.messagingengine.com ([202.12.124.156]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1uhD2B-001bvB-2O for pgsql-hackers@postgresql.org; Wed, 30 Jul 2025 20:04:20 +0000 Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfhigh.stl.internal (Postfix) with ESMTP id 736C57A00DA; Wed, 30 Jul 2025 16:04:18 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Wed, 30 Jul 2025 16:04:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm1; t=1753905858; x= 1753992258; bh=wTeRDMu0j95lEH8Z9Pz2c+Nn0j52bV9gkZc77DMDsR4=; b=P SHftiWnK5nCuigNGKs7u6/G0Vwutfl304VIxr1d7D0Fa3Xm10iEQ8+NMuHfP+8Y7 qihtaPdSmr/MYRKxWBmZq0kCIK3ScgX1GRRzlLwzmQZjYD+6cFjUx1BlhLUC0L9P U8WQZzT3I5rnexl8lsdYN6N6BrUyEulX8NrUX1doT06YQHpXwR9fiAzpG0HFItUC lL8SFyCQ6jWOO1w0NvUZ+hhV0QAPDxLblZIIPT5BGYdwKxWn8XfJ75J8Sw0xakVm No4jama+9vIrf+UJPN84hNGnOxMKR9HwG28gmwYHZPw2N4+RFPDkTNPQ2fTKmuRR DnOJtGIZwJjWoAh7lVpwg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1753905858; x=1753992258; bh=w TeRDMu0j95lEH8Z9Pz2c+Nn0j52bV9gkZc77DMDsR4=; b=TQFdNX1TH4jtrW8cI XChuQ3rKYKNKaavc+rJ2Ppm1qpYrPfhoPZJHuQblGovm8zRAFUczFQy00kf2jszY voQK1deW7A73lVQXMIYkLH2AL/k17dienVZAZXWC/gboQmEZ+z13FQ2NgwPcc91H dZhFttq2EZNxcBLQ4U34l5LyUiI8LFV7kQ6D5gw+bJiq3Z9P1l1t5q83YTOv0ahI Ad1vbqKgCv/n4XQpJao1VIhxMSIAfmNSMpMidyO1mxEXoE5/Q0nTsqxp4lmHyz8V u1TcaozIjRe4eHCOVt7lhv4j0GP406cdtVtdSgJavbQM+oElMR2/PLMJAnnTSGPv 3mt1Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdelkeekfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpeffhffvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpemllhhvrghrohcu jfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgeskhhurhhilhgvmhhurdguvgeqnecuggftrf grthhtvghrnhepfedvtdfhheevhefhjeekgfelhfeiheetteetteevuefhgfdtfeevjeff jeduudevnecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrghdpvghnthgvrhhprh hishgvuggsrdgtohhmpdhthhgvuggrihhlhiifthhfrdgtohhmnecuvehluhhsthgvrhfu ihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsehkuhhrih hlvghmuhdruggvpdhnsggprhgtphhtthhopeeipdhmohguvgepshhmthhpohhuthdprhgt phhtthhopehpvghtvghrsegvihhsvghnthhrrghuthdrohhrghdprhgtphhtthhopehnrg hthhgrnhgusghoshhsrghrthesghhmrghilhdrtghomhdprhgtphhtthhopehrohgsvghr thhmhhgrrghssehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhesjhdquggrvh hishdrtghomhdprhgtphhtthhopehmrghsrghordhfuhhjihhisehoshhsrdhnthhtuggr thgrrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrshesphhoshhtghhrvg hsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 30 Jul 2025 16:04:17 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1753905854; bh=i29E4iiB55wrgS+xSdH5pwNs0xfoWC8wjwlkhDhI6Sk=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=IwQcmuDlJiGsWGOMco9eRjCRLOP2lc9+xiNSCpIwwjBqD8kAVuurRTDs6kBu0b7mx xtvaAcLUCFWp0CICETjkZi6Pz6/FCL7zWX1if1aPpJtxl4xBQPLeulh/HqxK/1ZnFj MoXIeW/bjURQ3mR7oh+9f3yrWEIlAaqvSSb5lvoxHWB4BcboP92s09/+Vk9x55fPiA feTHEKX75KGnf/VsT9Ez8cO1eoodniSCeddNjAdMQaX2ngqRuW/loJuj5X/HtKZKf3 AQpxkNLgJ84U3NUpXVh/Wuyg5GRmJsjCNsmIjDaeyHrbOvg/iOZvNPf7yVO0otV+fU pt+5ny5DOW4yg== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id 74D7E90; Wed, 30 Jul 2025 22:04:14 +0200 (CEST) Date: Wed, 30 Jul 2025 22:04:14 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Jeff Davis Cc: Fujii Masao , Robert Haas , Nathan Bossart , Peter Eisentraut , pgsql-hackers Subject: Re: pg_dump --with-* options Message-ID: <202507302004.bjwvd3jk6rh6@alvherre.pgsql> 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 2025-Jul-30, Jeff Davis wrote: > On Wed, 2025-07-30 at 10:23 +0200, Álvaro Herrera wrote: > > Maybe we should invent a new > > switch, something like > >   --include=[schema,data,statistics] > > with which users can give one or more comma-separated types to be > > included in the dump.  > > Robert Treat brought up a similar idea before: > > https://www.postgresql.org/message-id/CABV9wwO5v8Nu8q%2BxWexMdL3Z%2B2xS%3DfFJMQetBSHy3tR64wNHOA%40mail.gmail.com Oh, I hadn't seen it, but now that I do, it seems identical to mine. He even used some of the same terms I did. > > Then we state that --data-only is synonym for --include=data and > > --schema-only is synonym for --include=schema, and we don't need any > > other switches.  Then it is obvious what happens, how to combine > > object types in the dumps and restores, and there's no need to reject > > invalid combinations because there aren't any. > > I assume that should be read as something like "include only", because > --include=data would also be excluding the schema and the stats. Of course. > And if that's the case, it does seem strange to do something like "-- > include=data --schema-only". > Another question: could you have multiple --include options, like "-- > include=data --include=schema"? Because you currently can't do "--data- > only --schema-only". So that would make it not quite an alias. IMO we should only allow one --include. > If we go in this direction, it might be easier to just say that -- > include conflicts with --schema-only and --data-only. Yep. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "Small aircraft do not crash frequently ... usually only once!" (ponder, http://thedailywtf.com/)