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 1uh8Ly-00AppB-Sd for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Jul 2025 15:04:27 +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 1uh8Lw-00AISQ-SV for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Jul 2025 15:04:25 +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 1uh8Lw-00AISH-EW for pgsql-hackers@lists.postgresql.org; Wed, 30 Jul 2025 15:04:24 +0000 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uh8Ls-001gf6-2V for pgsql-hackers@postgresql.org; Wed, 30 Jul 2025 15:04:24 +0000 Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-b39011e5f8eso6192802a12.0 for ; Wed, 30 Jul 2025 08:04:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20230601.gappssmtp.com; s=20230601; t=1753887859; x=1754492659; darn=postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=AiQEyw4y5rzpRJrj7lbBryT5ywFhitZR6wz8dUrtVrk=; b=eeHq/XhX8NDl9DVeiYigZe2nqMqp1W9rKZa4/Cx0vK1RJKQ+ZfTk+5rce6K0Z1WvX6 wXMp7vh2mZFFunD21KN8X7E5HwpKeD/8L9+JfS05/sy434pb1eqEZB4Fb9EeGU0sTeWG 1vQ7zahmV2MydfocU+hrllrpImJwHBIMhy3GUnaDBw0KXGAjwu/ofl8M6NlP7TPE9z3q IWQZ1kjDC0XCa4gHNGxuPx6VBzdwpSUmyUifBTSSWV2TyPXVwhhS7ReBtzJqVjP/nD4Y oRAIgJnjxIj3wmMVnzjgBJBTqHPjdFNE/vOYR+SgDOo7pyubUMicS5KB8720V0rjcJZg qKEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753887859; x=1754492659; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=AiQEyw4y5rzpRJrj7lbBryT5ywFhitZR6wz8dUrtVrk=; b=oxwqhLq2s63oJqSn6n1rG2DVqlXaeOjaMY1SEGNbWJpjNSQx8yFYO0p4wXjME6NL8B djTsUY0gYIReiitRFB9AT0YIwAyflzFfNFQ+2lUWhjwfNAVoClLOGtibq+IBNC+HCSIR rwf6L/ooKGaP4BlIwcEieDf19eTo1v8EM0w/u/7SfZSWHmWG+V9Hj9TC/8CP6f2MeFvv zUAPKi7yXX083fs6vR5VcPHXHC50Po1TI21gVE9mSESXpVPfOafUZMr5lynZ3BF24fHW XJN3g02AgmUs/xZ4BihNgnttV9PKVN2k+d5HPQjobsfiAsJED5h+rrmdrsZJrBYaKkUf IM5Q== X-Forwarded-Encrypted: i=1; AJvYcCW2zEeYoM4P+JnWj4MiRRcaHKTi7wcxtNOZMORqCdbrq8xNt+TyKKzKKa51RNTu5y63wunyrHOt1QvTgobR@postgresql.org X-Gm-Message-State: AOJu0Yy03PxiRzv8yOzYi7Xkws7/jtkiqFRbrgFhaSGiAM2VL01OKGQx iwplFpIsBqRX+lsaCtFFV0w6Dmc+gTXkeM3Y2K6U7Qm3fg7h7iCJ1qGwUKhTYjuwNA== X-Gm-Gg: ASbGnct87bDDFukGH14Qu6dnl3gxx10fYDtDnz4QtqQY5AiG9DavbhxtshDosbLGTKy lD4CmjIp5aO6PhmySKr37LeVezEIafqwv35+4evFUch3tGwX5VFeJiPyHiCU20ciS4AIaU4IPAw 8S/g5iEckX6kRKjRmjClQmZ0VQ7L8i58ciY76J/rFBqydqtUrb2LzdoC3+OWtjmKi2fNK/MfDwz BkPAjDG9K0UJjb9IAwS98L6ycUdwldFGtM4F7sX012QntF/xCIRGXUcb6NVgvAmzhpEcy36k+RR rPvf4I3CiKrVs7/gTKwVn19sksvfECD82grSInSF+rlSO0ORMQxxrJwhUaiVbpsVZa2PhxgYmkm 5XjbJmsbtuFcc8HYxveDk6ItAMsB7YrgE5a1OOyEo8LmtRVlsq8pAsrXdGN5zVSQ3hIIr9KFWm/ 3cZBQ= X-Google-Smtp-Source: AGHT+IEetK1XtwNQyXDYXnYHq5LLek9QSeFB2Eb0V1MNe3T0eY9wm4SKi8w30/UjMQGTaK0+jJoEWQ== X-Received: by 2002:a17:903:11c4:b0:240:11cd:8502 with SMTP id d9443c01a7336-24096a6401dmr53083545ad.13.1753887858886; Wed, 30 Jul 2025 08:04:18 -0700 (PDT) Received: from jeff-ws-bridge.lan (c-76-102-242-158.hsd1.ca.comcast.net. [76.102.242.158]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-24079f6aac6sm37602515ad.11.2025.07.30.08.04.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jul 2025 08:04:18 -0700 (PDT) Message-ID: Subject: Re: pg_dump --with-* options From: Jeff Davis To: =?ISO-8859-1?Q?=C1lvaro?= Herrera , Fujii Masao Cc: Robert Haas , Nathan Bossart , Peter Eisentraut , pgsql-hackers Date: Wed, 30 Jul 2025 08:04:17 -0700 In-Reply-To: <202507300823.e4fwfr5vorka@alvherre.pgsql> References: <202507300823.e4fwfr5vorka@alvherre.pgsql> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.3-0ubuntu1 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2025-07-30 at 10:23 +0200, =C3=81lvaro Herrera wrote: > Maybe we should invent a new > switch, something like > =C2=A0 --include=3D[schema,data,statistics] > with which users can give one or more comma-separated types to be > included in the dump.=C2=A0=20 Robert Treat brought up a similar idea before: https://www.postgresql.org/message-id/CABV9wwO5v8Nu8q%2BxWexMdL3Z%2B2xS%3Df= FJMQetBSHy3tR64wNHOA%40mail.gmail.com I'm certainly open to (re-)considering it. > Then we state that --data-only is synonym for --include=3Ddata and > --schema-only is synonym for --include=3Dschema, and we don't need any > other switches.=C2=A0 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=3Ddata would also be excluding the schema and the stats. And if that's the case, it does seem strange to do something like "-- include=3Ddata --schema-only". Another question: could you have multiple --include options, like "-- include=3Ddata --include=3Dschema"? Because you currently can't do "--data- only --schema-only". So that would make it not quite an alias. If we go in this direction, it might be easier to just say that -- include conflicts with --schema-only and --data-only. Regards, Jeff Davis