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 1tGJoc-002CxX-Jp for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Nov 2024 15:18:54 +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 1tGJoa-00Fv9P-K9 for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Nov 2024 15:18:52 +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 1tGJoa-00Fv9A-6W for pgsql-hackers@lists.postgresql.org; Wed, 27 Nov 2024 15:18:52 +0000 Received: from mail-qt1-x829.google.com ([2607:f8b0:4864:20::829]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tGJoY-004LMh-1p for pgsql-hackers@lists.postgresql.org; Wed, 27 Nov 2024 15:18:51 +0000 Received: by mail-qt1-x829.google.com with SMTP id d75a77b69052e-4668486dec2so29187571cf.3 for ; Wed, 27 Nov 2024 07:18:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732720728; x=1733325528; 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=TPwkKPagpz0hbkRTJnDr2g3ZUH7QrOJjYHIQb7/VJjY=; b=ZwCUJBuNR16SBy3Zt5avLXtlK8OPc2+9BnL8v3yqKkgzhrh7KEtpGZ9102JAw+zWHP 8uNBHxD8o/gYFPZvg2zz5pArs1tu2VomC+cf94zTaf/zAogHjiKk5uGNPUit04byu7Xv 08G8SPHmm6oJfR9z5qnMM+7v0UKNBr+tEhE2fQZKw0HXbisbGDAZjaJeJG15frEQKko5 Q3937ijWr3b+uTWs9tMOoOQz6V+aqXhp/a2/kVDZjGqqXHm4hWEM2UokNwtpFb3inXHp zZuNTYMlxcWDije9PJL2Y4XZA1cX+5mwAlgo2YziTbxYfJE16j317RBEYlaSwAofTeDd DvTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732720728; x=1733325528; 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=TPwkKPagpz0hbkRTJnDr2g3ZUH7QrOJjYHIQb7/VJjY=; b=iv9txDMp4hZqVdZOpxvLjfDib3ZACussxcdJM9hjlth+5yOUIpAn9d9W2MU0fONjnH OabnmZC2d0nosqj6VeL4tu52sGoJjlIiKKK/VEYlLI8XEwCb+glWVUpWVNB1avWd1tYP L5NA566RFh7qGA8VWll/5bAAd8vvKKfiwGAumQ8JO7rWehplf+zWSI8+RUXiyRofNaOG drHqcEDSHan8J/6sCKn5urWdDu5HEDtzH6JuAoCbsoQsw7ot4+FBZDu5VeFDgItU1pei i6DSfy16az9a6Rro1gglvTV8w0Dl5Q4656xdFQvCA+Iz70N3kEKDYgFEpDRlbFR/cPVE FneA== X-Forwarded-Encrypted: i=1; AJvYcCXbllkjZxbgK4AdT6DqrgY3qvl21BPXOduoMOtusSfZoSWcrLt1ysynAMbyIXrOv1Zf65e05Cqm51q7BXyY@lists.postgresql.org X-Gm-Message-State: AOJu0YykhHcFQ1Jhu3ZX5rNKBucaCTlV9Si6ZDuLGzcgfqcU6gGfUTyz eMH8EIM4n6TuHnZSCAB6yWISo+R19XqStKtIK0ScADZKjKMaH/Pl X-Gm-Gg: ASbGnctVf6QOMtiAxm5ynnz8oxuq7uAsV2mvhSutLriHXT8oGx14N/xPbzBNapW4DQ2 KiH3whZ3pIOPe4LRjVHTbfcAb7YmUa7T5HVjlMgVlVDtvsKbdE57R2gOgUVoOia+7Qy3s8QtfI9 oN9MRhXcLFuvzsH4F33025ktU4LxSFMOS8J1UhYGgvSU5ZAG+R0Tx+EBR9itFt/wEVx0UYhdKfe vgQmxuUyQemSBBER6LVCj2RTpFIBhII7RaoL2usb9/U423gFHjXDX6yIV2g6AYHiZB8b+SFKg3Z 6TKUgkFYDdZuYpwDP5+Sg98QjeLCiDFdmsmKC8UW X-Google-Smtp-Source: AGHT+IH536hHUOxn3R23J3+ohkecLlib110yzlixtEQzUGtw82YCtLB3I2trqQ1G+gFZb6ONgwzswg== X-Received: by 2002:a05:622a:20b:b0:466:7e33:9582 with SMTP id d75a77b69052e-466b36110e7mr56319521cf.37.1732720728366; Wed, 27 Nov 2024 07:18:48 -0800 (PST) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4653c3d7f56sm70889631cf.1.2024.11.27.07.18.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Nov 2024 07:18:47 -0800 (PST) Date: Wed, 27 Nov 2024 09:18:45 -0600 From: Nathan Bossart To: Alvaro Herrera Cc: Bruce Momjian , Magnus Hagander , Corey Huinker , Jeff Davis , jian he , Matthias van de Meent , Tom Lane , Stephen Frost , Ashutosh Bapat , Peter Smith , PostgreSQL Hackers Subject: Re: Statistics Import and Export Message-ID: References: <202411271500.ooa5pt3nb5kp@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202411271500.ooa5pt3nb5kp@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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