pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: Corey Huinker <corey.huinker@gmail.com>
Cc: Jeff Davis <pgsql@j-davis.com>
Cc: jian he <jian.universality@gmail.com>
Cc: Matthias van de Meent <boekewurm+postgres@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
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>
Subject: Re: Statistics Import and Export
Date: Wed, 27 Nov 2024 09:18:45 -0600
Message-ID: <Z0c4VRY3VtrIfHIY@nathan> (raw)
In-Reply-To: <202411271500.ooa5pt3nb5kp@alvherre.pgsql>
References: <Z0cyU15g7x0TrGd9@momjian.us>
	<202411271500.ooa5pt3nb5kp@alvherre.pgsql>

On Wed, Nov 27, 2024 at 04:00:02PM +0100, Alvaro Herrera wrote:
> On 2024-Nov-27, Bruce Momjian wrote:
> 
>> On Wed, Nov 27, 2024 at 02:44:01PM +0100, Magnus Hagander wrote:
>> > If you want to avoid both the surprise and confusion factor mentioned before,
>> > maybe what's needed is to *remove* --analyze-in-stages, and replace it with
>> > --analyze-missing-in-stages and --analyze-all-in-stages (with the clear warning
>> > about what --analyze-all-in-stages can do to your system if you already have
>> > statistics).
>> > 
>> > That goes with the "immediate breakage that you see right away is better than
>> > silently doing the unexpected where you might not notice the problem until much
>> > later".
>> > 
>> > That might trade some of that surprise and confusion for annoyance instead, but
>> > going forward that might be a clearer path?
>> 
>> Oh, so remove --analyze-in-stages and have it issue a suggestion, and
>> make two versions --- yeah, that would work too.

We did something similar when we removed exclusive backup mode.
pg_start_backup() and pg_stop_backup() were renamed to pg_backup_start()
and pg_backup_stop() to prevent folks' backup scripts from silently
changing behavior after an upgrade.

> Maybe not remove the option, but add a required parameter:
> --analyze-in-stages=all / missing
> 
> That way, if the option is missing, the user can adapt the command line
> according to need.

I like this idea.

-- 
nathan





view thread (543+ messages)  latest in thread

Message-ID: <Z0c4VRY3VtrIfHIY@nathan>
Permalink:  ../Z0c4VRY3VtrIfHIY@nathan/
Also on:    postgresql.org/message-id/Z0c4VRY3VtrIfHIY@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, alvherre@alvh.no-ip.org, bruce@momjian.us, magnus@hagander.net, corey.huinker@gmail.com, pgsql@j-davis.com, jian.universality@gmail.com, boekewurm+postgres@gmail.com, tgl@sss.pgh.pa.us, sfrost@snowman.net, ashutosh.bapat.oss@gmail.com, smithpb2250@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: Statistics Import and Export
  In-Reply-To: <Z0c4VRY3VtrIfHIY@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