pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Corey Huinker <corey.huinker@gmail.com>
Cc: jian he <jian.universality@gmail.com>
Cc: Jeff Davis <pgsql@j-davis.com>
Cc: Matthias van de Meent <boekewurm+postgres@gmail.com>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Cc: Peter Smith <smithpb2250@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: alvherre@alvh.no-ip.org
Subject: Re: Statistics Import and Export
Date: Tue, 8 Oct 2024 10:11:08 -0500
Message-ID: <ZwVLjJFow-ozJMCq@nathan> (raw)
In-Reply-To: <CADkLM=eErgzn7ECDpwFcptJKOk9SxZEk5Pot4d94eVTZsvj3gw@mail.gmail.com>
References: <c2e39c70c229cf59eb430431b08e9abfffe43b08.camel@j-davis.com>
	<CADkLM=e0jM7m0GFV44nNtvL22CtnFUu+pekppCVE=DOBe58RTQ@mail.gmail.com>
	<e1c15b4eb1472f5bba9d61315b3fc2fb7484d8a4.camel@j-davis.com>
	<9e068620350f0158e791fc0b9a68df896d4402c6.camel@j-davis.com>
	<CADkLM=eu72o_=s2ARNe8yB-16AUm+_iU0tq_ALeeUUxCCqJkOQ@mail.gmail.com>
	<11bb2c7403d4a7421fe8b09df6737aa83976266e.camel@j-davis.com>
	<CACJufxHrJb3L66kzYWeFvN_7RNROaHKUo_JuXK6B64c+TkWOhA@mail.gmail.com>
	<CADkLM=edhVxHr5OGZHnUeoMkjFYNpE==puOKbB1E_7j1=QsbBw@mail.gmail.com>
	<CACJufxGmdV-9c7M_fs-2mGBMj1XiVqdOkW0NvibmpBJqedo1uQ@mail.gmail.com>
	<CADkLM=eErgzn7ECDpwFcptJKOk9SxZEk5Pot4d94eVTZsvj3gw@mail.gmail.com>

I took a look at v29-0006.

On Tue, Sep 17, 2024 at 05:02:49AM -0400, Corey Huinker wrote:
> From: Corey Huinker <corey.huinker@gmail.com>
> 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





view thread (543+ messages)  latest in thread

Message-ID: <ZwVLjJFow-ozJMCq@nathan>
Permalink:  ../ZwVLjJFow-ozJMCq@nathan/
Also on:    postgresql.org/message-id/ZwVLjJFow-ozJMCq@nathan

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: nathandbossart@gmail.com, corey.huinker@gmail.com, jian.universality@gmail.com, pgsql@j-davis.com, boekewurm+postgres@gmail.com, bruce@momjian.us, tgl@sss.pgh.pa.us, magnus@hagander.net, sfrost@snowman.net, ashutosh.bapat.oss@gmail.com, smithpb2250@gmail.com, pgsql-hackers@lists.postgresql.org, tomas.vondra@enterprisedb.com, alvherre@alvh.no-ip.org
  Subject: Re: Statistics Import and Export
  In-Reply-To: <ZwVLjJFow-ozJMCq@nathan>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox