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 1tGMQN-002VhO-9U for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Nov 2024 18:06:03 +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 1tGMQL-00HPOr-Ie for pgsql-hackers@arkaria.postgresql.org; Wed, 27 Nov 2024 18:06:01 +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 1tGMQK-00HPOj-Ah for pgsql-hackers@lists.postgresql.org; Wed, 27 Nov 2024 18:06:01 +0000 Received: from fout-b6-smtp.messagingengine.com ([202.12.124.149]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tGMQH-004CQq-Co for pgsql-hackers@lists.postgresql.org; Wed, 27 Nov 2024 18:05:59 +0000 Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfout.stl.internal (Postfix) with ESMTP id B3C5F11401A0; Wed, 27 Nov 2024 13:05:55 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-11.internal (MEProxy); Wed, 27 Nov 2024 13:05:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1732730755; x=1732817155; bh=I 6LxJ+XrkposksVsZbt7Ti2cv7yVLT3HiHhYQCRA/E0=; b=pjqjx5pqGh3az0i0w HndD06vVaLpv6vzcnc3+2MUS14oUaxvlE970AakW6bOrYtnZFlki6lTOE1dmtAik 1UvmqKtuWz2MCtUeTQ+OvYVl8s/XQ44AkUUq78ckAzEgLVYqgdKzwq3gtt6NRXLQ k3e5+ERF7PDKmQeKtbF31XIiVtt2NhgCFQ7mANmF/NVlNmgPrpyEo9/qoWq90Phb qsiZ8XG6qEKQVIlHSjdrwsbINAOQmyJ6tefxGztfVAZuMlWD/MBfnCfIn7gE2wCw xeJqDQBKh7arC/gVRyN5Z0CJRnMiJvSCZuGhpF2kkAYz5H4pCZ/AKSmWxS3ve5l1 nuF7w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrgeelgddutdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeen ucfhrhhomheptehlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhh drnhhoqdhiphdrohhrgheqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffh jeejhffgieeuueekjeekfffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrph hrihhsvggusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgpdhnsggprh gtphhtthhopeduuddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprghshhhuthho shhhrdgsrghprghtrdhoshhssehgmhgrihhlrdgtohhmpdhrtghpthhtohepsghovghkvg ifuhhrmhdophhoshhtghhrvghssehgmhgrihhlrdgtohhmpdhrtghpthhtoheptghorhgv hidrhhhuihhnkhgvrhesghhmrghilhdrtghomhdprhgtphhtthhopehjihgrnhdruhhnih hvvghrshgrlhhithihsehgmhgrihhlrdgtohhmpdhrtghpthhtohepnhgrthhhrghnuggs ohhsshgrrhhtsehgmhgrihhlrdgtohhmpdhrtghpthhtohepshhmihhthhhpsgdvvdehtd esghhmrghilhdrtghomhdprhgtphhtthhopehmrghgnhhusheshhgrghgrnhguvghrrdhn vghtpdhrtghpthhtohepphhgshhqlhesjhdquggrvhhishdrtghomhdprhgtphhtthhope hpghhsqhhlqdhhrggtkhgvrhhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 27 Nov 2024 13:05:54 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1732730751; bh=UvxSUgn0CKck1+p8v54rQBR0E6psdXMFNj+2VYAEyx8=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=qgSWFTwRA9q5TnDc5+41E4EpzwrTStxJnvifAjzSvLHAxLiGkwvI+HCZb8DyyLQEK Gz2aBli4HJPESKI5NgRmalvZZDdQfs5oqXbkwhPc9Pj+KHVTsNcpK0oe8kMZXOTG+p IwsysGaOYHcAh1st4mknO1oQARqplJX+AVtqxP958yV7NPCEGpWHMW7KrQJy5orRAw j+/6iLH6LZoVoiCFnCzhgcoeDC3F/j4FqrUEjAavL70uY0MwWaNpukQZ48VjSS951A 3FmJ4Afczm4UnwN9daqVTzw5ZO56b+ucB7Ouxn4DsFR9UnIdRJSb2Sa0/7vd0e6qk/ +eFZXCI3hA43A== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id B402C95; Wed, 27 Nov 2024 19:05:51 +0100 (CET) Date: Wed, 27 Nov 2024 19:05:51 +0100 From: Alvaro Herrera To: Tom Lane Cc: Bruce Momjian , Nathan Bossart , Magnus Hagander , Corey Huinker , Jeff Davis , jian he , Matthias van de Meent , Ashutosh Bapat , Peter Smith , PostgreSQL Hackers Subject: Re: Statistics Import and Export Message-ID: <202411271805.vmm2bsgjqsm2@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1869337.1732725865@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2024-Nov-27, Tom Lane wrote: > I do not like the idea of breaking existing upgrade scripts, > especially not by requiring them to use a parameter that older > vacuumdb versions will reject. That makes it impossible to have a > script that is version independent. I really doubt that there is any > usability improvement to be had here that's worth that. I was only suggesting to break it because it was said upthread that that was desirable behavior. > How about causing "--analyze-in-stages" (as currently spelled) to > be a no-op? We could keep the behavior available under some other > name. I think making it a no-op isn't useful, because people who run the old scripts will get the behavior we do not want: clobber the statistics and recompute them, losing the benefit that this feature brings. On 2024-Nov-27, Bruce Momjian wrote: > Uh, I guess we could do that, but we should emit something like > "--analyze-in-stages option ignored". I think emitting a message is not useful. It's quite possible that the output of pg_upgrade will be redirected somewhere and this will go unnoticed. Maybe the most convenient for users is to keep "vacuumdb --analyze-in-stages" doing exactly what we want to happen after pg_upgrade, that is, in 18+, only recreate the missing stats. This is because of what Corey said about messaging: many users are not going to get our message that they need to adapt their scripts, so they won't. Breaking the script would convey that message pretty quickly, but you're right that it's not very convenient. For people that want to use the old behavior of recomputing _all_ statistics not just the missing ones, we could add a different switch, or an (optional) option to --analyze-in-stages. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/