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 1uhAUP-00BCvd-4V for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Jul 2025 17:21:17 +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 1uhAUO-00BNbv-5T for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Jul 2025 17:21:16 +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 1uhAUN-00BNbm-Qe for pgsql-hackers@lists.postgresql.org; Wed, 30 Jul 2025 17:21:16 +0000 Received: from mail-io1-xd30.google.com ([2607:f8b0:4864:20::d30]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uhAUK-001hn3-1e for pgsql-hackers@lists.postgresql.org; Wed, 30 Jul 2025 17:21:15 +0000 Received: by mail-io1-xd30.google.com with SMTP id ca18e2360f4ac-86efcef9194so1563939f.0 for ; Wed, 30 Jul 2025 10:21:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1753896071; x=1754500871; darn=lists.postgresql.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=7PnDbAiGOMCjDi3vM8oikwCr8qZZb7swLSZ6/yPVv2Y=; b=NEzHMhNLABIRMLoWR2gIsIVkkR3fEK/IoMqM4yKmqezz4mKJC6oMc/7IFVfqD/zSkp igEkEW5CoxCGt1wksxMKkU7rLmC3PDBN2+buShVmeeN1HLuF40oFSii8WhaA6JFJMtjP dXKjaB3T3B4T9zrCZUUk7uXPNqg60k9Upjc2VCiztmv2Vw6g9r+TsMhpFOc6pu2/cpcz 1sW2nwm2OdSXJsYC8BBlhbL9OB3/hOe7hTnMdVRlEZCaz6ZjjK+SNr5v2PTA/pycDbzh 2Zl68Pnz69zqJi0GSPJWGXqsQe8m0gHkLTHSr32FMcFarvOp+yz3RIuB9rOEeS+pT5z1 v/dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753896071; x=1754500871; h=in-reply-to:content-transfer-encoding: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=7PnDbAiGOMCjDi3vM8oikwCr8qZZb7swLSZ6/yPVv2Y=; b=a4126A232wCkKDf+Ls+gCf0dSsUuc68cTP22pvg/Ihryjlgftn+3qZ0XHbaH1wIJK9 wZR7WOAFriow87Qum+T3e0egOOOKttELNm3GdSAS3uXyW2aeQwz5ibyFFHnf6dIpEksu gJuCh0RXGBibA0+rqO839ZSwcEd8ZlKFglK+Gyh2e70DsdwyKC6ykPl12yPULz2NDQSi zYBYwgT1LzEhJpeb63Ryc3fERLk6w7KFatqyXsgsdZ6cfF25Kj+b+3SVYwKGBfS0samM OsWDd2B3YVV67NjLkwreR60l2781/t7Awt0tTCryr+9HAf6H3AbZXVi/3ADj0k6iP0ZG 8xaw== X-Forwarded-Encrypted: i=1; AJvYcCWd/96VZmmJ3IZu04z/6WSULpzNgBc1WkOwT2Ylnch25B4h/PYt++OeCTsGC/FgGcjxQELjy3RzMN13hQGD@lists.postgresql.org X-Gm-Message-State: AOJu0YyxhjuYfgJn763vrMil7SZWHPAS9iPd3vi6opoqO7CF1mRKLD2N ICX7v/TDbRZovy0UxxGcvd7L51s/bfi21hiLuNrvjRuTdeh6jV6zRzaR X-Gm-Gg: ASbGncvo2/ZToHsRxrCqO9s20+LJebv/IR5pU20l6TZhjkIePT+9YMjTcZfoZYIAUoS XSjJg1G6jbxDuE6K24J00GVheQSenxHnRCNbpPWr7743uRI7T3S3xojlbDsiPvoaBR821mdyd3O Vp0lV4yV6vUIVpLB4M7wY/R68ofOhYg4NtKwf44yVXV4aCEz3nsugMqEOen0utlnBxMBXFtd5ui 6XAj9C3+mNO82Doz2GMl8Bi23VkJnK8LqxDj4NzDv068uctRx2W3EQK22vss6vS0+lI9XSE5r7p S8DSoxw6jGgJZSTDLtLSgnjLjF5pFZl/HemNhxMbuMQI2Mh3RkSIjJkZ13ztKXp/ysvq0bBtwCa hbzEsJiSadHvb8zB1+yF1Gy4BxHnoqQmUegzYbfz1ftEc42NvojyqJE5DpBFRPlBmIfFsCTojbN EvJcAwE8vQ9A8/ X-Google-Smtp-Source: AGHT+IG+/e/emfXQaBxp1a33NAnfw1tXhbjxRzVm1oFiFe0FYhxCu8bsvNw99OuqMTh7Bdz2mlpJ8A== X-Received: by 2002:a92:c243:0:b0:3e2:a749:250b with SMTP id e9e14a558f8ab-3e3f625d741mr56193545ab.14.1753896070967; Wed, 30 Jul 2025 10:21:10 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-508c9343739sm3359382173.69.2025.07.30.10.21.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Jul 2025 10:21:10 -0700 (PDT) Date: Wed, 30 Jul 2025 12:21:08 -0500 From: Nathan Bossart To: "David G. Johnston" Cc: =?iso-8859-1?Q?Fr=E9d=E9ric?= Yhuel , Corey Huinker , Bruce Momjian , John Naylor , Masahiko Sawada , 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: vacuumdb changes for stats import/export Message-ID: References: <4b94ca16-7a6d-4581-b2aa-4ea79dbc082a@dalibo.com> <8320fa2e-9200-46e2-b905-4a4d84707020@dalibo.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="zby1MXPr4joEnNJh" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --zby1MXPr4joEnNJh Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Mon, Jul 28, 2025 at 01:46:34PM -0500, Nathan Bossart wrote: > On Mon, Jul 28, 2025 at 09:22:29AM -0700, David G. Johnston wrote: >> On Monday, July 28, 2025, Frédéric Yhuel wrote: >>> On 7/28/25 16:47, Nathan Bossart wrote: >>>> Obviously, this wording isn't clear enough. We might need to either >>>> remove that sentence or add "When used in conjunction with >>>> --analyze-in-stages..." >>> >>> I vote for the second option. >> >> Makes sense. > > It seems like there is some support for adding "When used in conjunction > with --analyze in stages..." to the beginning of the sentence. I'll give > it another day or two for any further discussion before committing. Here is what I have staged for commit. -- nathan --zby1MXPr4joEnNJh Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: attachment; filename=v1-0001-doc-Adjust-documentation-for-vacuumdb-missing-sta.patch Content-Transfer-Encoding: 8bit From 82117acd6132351c368ec2670c4ba7f481d69ff9 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Wed, 30 Jul 2025 12:13:30 -0500 Subject: [PATCH v1 1/1] doc: Adjust documentation for vacuumdb --missing-stats-only. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sentence in question gave readers the impression that vacuumdb deletes existing statistics for a period of time while analyzing, but it's actually meant to convey that --analyze-in-stages will temporarily replace existing statistics with ones generated with lower statistics targets. Reported-by: Frédéric Yhuel Reviewed-by: Frédéric Yhuel Reviewed-by: "David G. Johnston" Discussion: https://postgr.es/m/4b94ca16-7a6d-4581-b2aa-4ea79dbc082a%40dalibo.com Backpatch-through: 18 --- doc/src/sgml/ref/vacuumdb.sgml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/ref/vacuumdb.sgml b/doc/src/sgml/ref/vacuumdb.sgml index b0680a61814..c7d9dca17b8 100644 --- a/doc/src/sgml/ref/vacuumdb.sgml +++ b/doc/src/sgml/ref/vacuumdb.sgml @@ -282,9 +282,11 @@ PostgreSQL documentation Only analyze relations that are missing statistics for a column, index - expression, or extended statistics object. This option prevents - vacuumdb from deleting existing statistics - so that the query optimizer's choices do not become transiently worse. + expression, or extended statistics object. When used with + , this option prevents + vacuumdb from temporarily replacing existing + statistics with ones generated with lower statistics targets, thus + avoiding transiently worse query optimizer choices. This option can only be used in conjunction with -- 2.39.5 (Apple Git-154) --zby1MXPr4joEnNJh--