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 1tDSfP-000svu-Mo for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Nov 2024 18:09:35 +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 1tDSfN-00Figy-9H for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Nov 2024 18:09:33 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tDSfM-00Figp-Vk for pgsql-hackers@lists.postgresql.org; Tue, 19 Nov 2024 18:09:32 +0000 Received: from mail-qv1-xf34.google.com ([2607:f8b0:4864:20::f34]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tDSfK-002joz-GC for pgsql-hackers@lists.postgresql.org; Tue, 19 Nov 2024 18:09:31 +0000 Received: by mail-qv1-xf34.google.com with SMTP id 6a1803df08f44-6d3e9e854b8so461616d6.1 for ; Tue, 19 Nov 2024 10:09:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732039769; x=1732644569; 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=DFzud29UJw67Ls6QaXpIboSTxjzLT2uiXPEl7QRwUWI=; b=gRbf50WRBECau5jNCe+DKXOPNRSriB/pVIunWh49o14INBK7yhkvJVnQDYrWfKALOB 3Vkp3Y8TnC3hOpSwlMb9lu44OzrB2/qUwg7jQ5gB6wpRnZ2OQ1R3+X4/mpkw5kURx+Hu Q702eI+ysBO5NHlpIV7fxDsgPb7UwfNR3zuKCsZ/86b1gEChw6dvYhiMB2cSpDktTdVq TfUPwiTts2ZkO/oOpXGauxx5FjOcGJ3QtEcgEslG8UsTCvtSdnUih/1c3W1vYmZh1dbM jSiZTElKsX42AkWdqf+SL3PH4n0LXbKsMMyVGYQuDXzG9UfNGrG3xPClcRAVTGRCGb6J pNcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732039769; x=1732644569; 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=DFzud29UJw67Ls6QaXpIboSTxjzLT2uiXPEl7QRwUWI=; b=rvkV8CJABHuF5hWl0O84ZA94xfaDIlQRRoNIAMRrmZaQLp7ol6kSr3nyWzHMEJ0j0h OeVmVPHGXywtT3Aiv/c4jlcOtWEQnnEC8PLDxZVwTmWw3w34DOE72rl6CV3RNL+9W8jU t9qnjfln1j28aOONyqrCUwjUuoIzPAYycwC1vTg5alQO37+Iy1Ax+F+L43GII5mgxCEd PRCgi6Zq0WLzM5En2dgDimNfUkPil+ghSp0H5CEQoPa3jB9VY9JgpAifEu5hIy5fTDm0 u+QGTCK5D3n4EaxSIN+juVOL1db0DRddtcHd32WRt1T7Da5dOfT/2nHye+8IgF+GnCWr gRvw== X-Forwarded-Encrypted: i=1; AJvYcCUIOfPRHe5jT50XMfzUbd1c+Rbxaeegyp63oOA5Qck0adEU4+KSEXkZVOWPxSTskZhAAeXyGPk/MFll9fL3@lists.postgresql.org X-Gm-Message-State: AOJu0YzfboaHwq3XvmOj+qGqQ8jwge0ywvOCn0ai/r9hd34cIp0fnfs+ 1vxd0LWONyneGMGtZ8cm5ESYYf8DWKujDKk7b4qlPosTcxQY07Qp X-Google-Smtp-Source: AGHT+IEDuRUIwrgySrUdJt9W3QUKpDtim+KohxdRKtBqa9KFV88m2Jqa1nqnWDaLLM+1pcC2+WYWwg== X-Received: by 2002:a05:6214:27cc:b0:6d4:262d:da6c with SMTP id 6a1803df08f44-6d42b94a7f9mr73888176d6.24.1732039769202; Tue, 19 Nov 2024 10:09:29 -0800 (PST) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6d40dbe1dbdsm50721576d6.4.2024.11.19.10.09.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Nov 2024 10:09:28 -0800 (PST) Date: Tue, 19 Nov 2024 12:09:26 -0600 From: Nathan Bossart To: Bruce Momjian Cc: Corey Huinker , Jeff Davis , jian he , Matthias van de Meent , Tom Lane , Magnus Hagander , Stephen Frost , Ashutosh Bapat , Peter Smith , PostgreSQL Hackers , alvherre@alvh.no-ip.org Subject: Re: Statistics Import and Export Message-ID: References: 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 On Mon, Nov 18, 2024 at 08:42:35PM -0500, Bruce Momjian wrote: > We can't design an API around who is going to be surprised. We have to > look at what the options say, what people would expect it to do, and > what it does. The reason "surprise" doesn't work in the long run is > that while PG 18 users might be surprised, PG 20 users will be confused. I think Bruce makes good points. I'd add that even if we did nothing at all for vacuumdb, folks who continued to use it wouldn't benefit from the new changes, but they also shouldn't be harmed by it, either. >> I, personally, would be fine if this only modified --analyze-in-stages, as it >> already carries the warning: > > Right, but I think we would need to rename the option to clarify what it > does, e.g. --analyze-missing-in-stages. If they use > --analyze-in-stages, they will get an error, and will then need to > reference the docs to see the new option wording, or we can suggest the > new option in the error message. > >> But others felt that --analyze-only should be in the mix as well. > > Again, with those other people not saying so in this thread, I can't > really comment on it --- I can only tell you what I have seen and others > are going to have to explain why they want such dramatic changes. I don't have a strong opinion here, but I suspect that if I was creating vacuumdb from scratch, I'd have suggested a --missing-only flag that would only work for --analyze-only/--analyze-in-stages. That way, folks can still regenerate statistics if they want, but we also have an answer for folks who use pg_upgrade and have extended statistics. -- nathan