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 1syBrp-00EzEn-9i for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Oct 2024 15:11:17 +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 1syBrn-009UCZ-UP for pgsql-hackers@arkaria.postgresql.org; Tue, 08 Oct 2024 15:11:15 +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 1syBrn-009UCQ-Kr for pgsql-hackers@lists.postgresql.org; Tue, 08 Oct 2024 15:11:15 +0000 Received: from mail-qt1-x836.google.com ([2607:f8b0:4864:20::836]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1syBrk-0000ZU-Ew for pgsql-hackers@lists.postgresql.org; Tue, 08 Oct 2024 15:11:15 +0000 Received: by mail-qt1-x836.google.com with SMTP id d75a77b69052e-4581e7f31eeso49536451cf.0 for ; Tue, 08 Oct 2024 08:11:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728400271; x=1729005071; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=YY0ZUT8olXjD888x24c40/PPgmlVTeXg6eKOHP864cI=; b=CpUG19Kpt2QtJqf3YIP7frTVvzd/kSPI62XD037rDkY9/xVQOFSMlLmZurk/Kl9RKb j0CIzg4teyKzTtPd3nloiODd8WGT2yW920+2izv3MSqDmBN9e1VjxSZ7iYnZ2X+U4Dd2 5b2rHyGW3cDeK255NCu83YzZ5irx12rYjjm/ZSsjvPHDWjTCWGpuLlw4kZY8tAbTZq8W PiXOsoNKbRCVeie9pb7fvdlnTtptMZUYVUT2ITMF6bbLZJPeMvoques7UP7Ry+SLHlSI nMJ5prE+lTJOAQNg8naaGs7Rfq1UL5FwaKZtS7M+KNY/XRnR/SBMJu9x5aYuyqleZES6 iUyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728400271; x=1729005071; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=YY0ZUT8olXjD888x24c40/PPgmlVTeXg6eKOHP864cI=; b=A5dWjMpMdLXij/G/wgdzF+Nk2U2JVr1HqEi9ffDjJBURiCDFJY8fZMGi7EYl0tBGe6 jc28s4Aq9i77iMVkXq5kk7V8H/7BjTjlon2heQjIo4vndauVXmflqqNo6LMeQb/QO3x3 hQCUZ6pVyi1VkHTqCePCwu+06mgZhIjMpDpTnn69UbFjrOsN9yzZdizQJ9gDrmtQenM4 U+uanMOWyQ08ulHQWtfRxVkDtZugBoL3PuetmP+sTm4p2AB4tEXHpmIGDAiGo9PCRy4P /R33ZMQqo5M7FsAYnj9tkH2M49jUjuKjFaGCFqvYNI6sYkakJQR/D98QKlKIrxIYwS5h 58pw== X-Forwarded-Encrypted: i=1; AJvYcCX58ul49Z3EObBp08N+N21QGTb2UlEx4yt0plzrygXJ6OBq5f7sHmNYTIJkfvpPSkWFmWH+VfgeWNZ/Jntb@lists.postgresql.org X-Gm-Message-State: AOJu0YzLMFjCUjzKZ55vOypaeeBCvyCUu0pPa2qgSF/H3ejw9G6KpT92 7sL4//Z9IfRBb2kcdvAsFuMq0nLreqAX3zGVUYz2THy2B02gL++m X-Google-Smtp-Source: AGHT+IF7HCnSLfesvKY3507+tvujeoAAiJ0nGMC2APXIvnyfTRaR3WJZzJ4s65k3wgIJnSn3DAI9YA== X-Received: by 2002:ac8:7d43:0:b0:458:4bf1:1f46 with SMTP id d75a77b69052e-45d9bb442c9mr304453611cf.53.1728400271518; Tue, 08 Oct 2024 08:11:11 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-45da75ed3ddsm37214821cf.73.2024.10.08.08.11.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Oct 2024 08:11:10 -0700 (PDT) Date: Tue, 8 Oct 2024 10:11:08 -0500 From: Nathan Bossart To: Corey Huinker Cc: jian he , Jeff Davis , Matthias van de Meent , Bruce Momjian , Tom Lane , Magnus Hagander , Stephen Frost , Ashutosh Bapat , Peter Smith , PostgreSQL Hackers , Tomas Vondra , alvherre@alvh.no-ip.org Subject: Re: Statistics Import and Export Message-ID: References: <9e068620350f0158e791fc0b9a68df896d4402c6.camel@j-davis.com> <11bb2c7403d4a7421fe8b09df6737aa83976266e.camel@j-davis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I took a look at v29-0006. On Tue, Sep 17, 2024 at 05:02:49AM -0400, Corey Huinker wrote: > From: Corey Huinker > Date: Sat, 4 May 2024 04:52:38 -0400 > Subject: [PATCH v29 6/7] Add derivative flags dumpSchema, dumpData. > > User-set flags --schema-only and --data-only are often consulted by > various operations to determine if they should be skipped or not. While > this logic works when there are only two mutually-exclusive -only > options, it will get progressively more confusing when more are added. After glancing at v29-0007, I see what you mean. > In anticipation of this, create the flags dumpSchema and dumpData which > are derivative of the existing options schemaOnly and dataOnly. This > allows us to restate current skip-this-section tests in terms of what is > enabled, rather than checking if the other -only mode is turned off. This seems like a reasonable refactoring exercise that we could take care of before the rest of the patch set goes in. I added one new reference to dopt.schemaOnly in commit bd15b7d, so that should probably be revised to !dumpData, too. I also noticed a few references to dataOnly/schemaOnly in comments that should likely be adjusted. One other question I had when looking at this patch is whether we could remove dataOnly/schemaOnly from DumpOptions and RestoreOptions. Once 0007 is applied, those variables become particularly hazardous, so we really want to prevent folks from using them in new code. -- nathan