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 1tqfUF-008b3f-1h for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Mar 2025 21:44:07 +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 1tqfUB-000DIU-Tq for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Mar 2025 21:44:03 +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 1tqfUB-000DEs-JB for pgsql-hackers@lists.postgresql.org; Fri, 07 Mar 2025 21:44:03 +0000 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tqfU7-001ZZG-1g for pgsql-hackers@lists.postgresql.org; Fri, 07 Mar 2025 21:44:02 +0000 Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-2fef5c978ccso3744621a91.1 for ; Fri, 07 Mar 2025 13:44:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20230601.gappssmtp.com; s=20230601; t=1741383839; x=1741988639; darn=lists.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=INxHvf1vSDpTuu4PKY9gExak4aU6D6p47ziQQyD/YtU=; b=UnvSPihlHl+d29qKULEW759wZlWQCnsps89OrcgHNvi2JjX+ztX1bViS7+KSsrtpT0 2k8Kj3USHQmzng35xX0AoYigQuOgLNoMzTkpIOsqQXGVWHe2k7/HVjwzhvLq+YH4xXqt 52YteFtAx/4p8n2MZcr+FZmRWb9n0+UX46cK4TNahk3n0Bakyv9jNkSVtA88pcUEhqxx AQ+Oafx+9U8abzxH6crf+tRetMmKrPVaxfN7Yehf3ZHTuSzKWAwVjXfeWXKkQACZDfP9 LSuoGZBhWjG/t1MhxSHImoiYWjrNfIjaajD5lM+tueAj18IvCyZMpZO5uq6YFv6l5Riw 5LCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741383839; x=1741988639; 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=INxHvf1vSDpTuu4PKY9gExak4aU6D6p47ziQQyD/YtU=; b=Sz66fh9l/sMvu/Vvex03qdl3cBZ4OOf7sMiQP77Fn4qFatxQBduIvtb9Z0kFwrlmNS W+lcpNCYPBuCSgJb1OjmbxbkALAazOG8KicnzXWsGoBgrV2DYUR/+d3yAmIrB90TwM9u Z2Z65hqvkd0JYKdpppWl/kpiU7W9yEMqlJoOIbNiwZ86KWqfCXBg6lJ2Y1mkHzGq5WTU yA4sd0wd+UBxNDWPODamhSVkSUqPXGrS5gidJc2RL/jLpmcnl3EhxLiONqUnLD+mZjTG ZD3mpxfdGEOKvfS9V30PK0Jq00nfkPc9uxqoYEeGiu23n3Gf0RM7wpGA45xX0gsWM+LU KL5w== X-Forwarded-Encrypted: i=1; AJvYcCXV+1d+A3y0pigULV08DAwOKYLu9QIccAl6tK1LtriIhFZyFUAlDHGxh6RMaJcrRfCwut42dCm7GIQtoajG@lists.postgresql.org X-Gm-Message-State: AOJu0Yy6UyG3RpfDEiucW54684k/Kqgr3/1E7DDRjGlPonbVd4LQVktv aYR6uzZ8KRdndKlqh49dAJIIwnMKEKbpkwUTPlibrAgI47thqvpUfAexnfeqig== X-Gm-Gg: ASbGnctG9nA9nUr4NUISuRk1cTr3jaXkWHbg+VcG9k8/xQjSXXPtRkP3dt/jBhInYJd kUPrAH+H9eWO6eLleV2fkPxPB0PORNcc1+ocgIqYiFdqQsJG71y1s+0dAp7768kVovEBbo2oZiN /z1rnOkXqddvPpFbi0pO0pGPbAiogPQo+D4OaXtOSUAy8W1YpFfSx+ngva7eLImWMeanZBKctLz m9rSLIr7BdxdfM2z9dDLoc/3IOlszeGcPcCJlkLquUBcds1oYinh2z5w5NVX4O7RdlaiGXUbvl7 t9GvvPIa5hPCKeF4dYU1qNewLWqy3621plyfMMi+FSvUfCT3qGIIYL+vZwhV7HSLDDUQs374d/E u9UXa72S46XM= X-Google-Smtp-Source: AGHT+IHOVQPu7Ee8EFz7Uu4pwqxNN9TZSQGuiF693r43nnASbP8ruGrVPMg/MVvs47eh/FaYsFMiJQ== X-Received: by 2002:a17:90b:2e51:b0:2ee:f440:53ed with SMTP id 98e67ed59e1d1-2ff7cf20acemr7142710a91.31.1741383838689; Fri, 07 Mar 2025 13:43:58 -0800 (PST) Received: from ?IPv6:2601:642:4c01:278b:568d:e0d:b2aa:6e64? ([2601:642:4c01:278b:568d:e0d:b2aa:6e64]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2ff4e826141sm5430644a91.48.2025.03.07.13.43.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Mar 2025 13:43:58 -0800 (PST) Message-ID: Subject: Re: Statistics Import and Export From: Jeff Davis To: Robert Treat Cc: Robert Haas , Andres Freund , Corey Huinker , Nathan Bossart , Tom Lane , Michael Paquier , jian he , Bruce Momjian , Matthias van de Meent , Magnus Hagander , Stephen Frost , Ashutosh Bapat , Peter Smith , PostgreSQL Hackers , alvherre@alvh.no-ip.org Date: Fri, 07 Mar 2025 13:43:56 -0800 In-Reply-To: References: <6af48508a32499a8be3398cafffd29fb6188c44b.camel@j-davis.com> <6rpmhyrtci4epuzay7y5xvd2cwdwb6zmtt6ofxrvakyawxhm7s@6grajbpr4kij> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu2 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, 2025-03-07 at 15:46 -0500, Robert Treat wrote: > There might be some variability depending on the default behavior, > but > if we assume that default means "output everything" The reason I posted this patch is that, depending on performance characteristics in v18 and a decision to be made during beta, the default may not output statistics. So we need whatever set of options we choose to have the freedom to change statistics to be either opt-in or opt-out, without needing to reconsider the overall set of options. I tried to generalize that requirement to all of {schema|data|statistics} for consistency, but that resulted in 9 options. We don't need the options to be perfectly consistent at the expense of usability, though, so if 9 options is too many we can just have three new options for stats, for a total of 5 options: --data-only --schema-only --statistics-only --statistics (stats also, regardless of default) --no-statistics (no stats, regardless of default) which would allow combinations like "--schema-only --statistics" to mean "schema and statistics but not data". There would be a bit of weirdness because --statistics can combine with --data-only and -- schema-only, but nothing can combine with --statistics-only. > if you want everything --include=3Dschema,data,statistics (presumably > redundant with the default behavior) > if you want schema only --include=3Dschema > if you want "everything except schema" --include=3Ddata,statistics That could work. Comparing to the options above yields: --include=3Dstatistics <=3D> --statistics-only --include=3Dschema,data,statistics <=3D> --statistics --include=3Dschema,statistics <=3D> --schema-only --statistics --include=3Ddata,statistics <=3D> --data-only --statistics --include=3Dschema,data <=3D> --no-statistics Not sure which approach is better. Regards, Jeff Davis