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 1uH3iG-00Cj5V-E4 for pgsql-hackers@arkaria.postgresql.org; Mon, 19 May 2025 16:51:40 +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 1uH3iF-00HNdq-8n for pgsql-hackers@arkaria.postgresql.org; Mon, 19 May 2025 16:51:39 +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 1uH3iF-00HNdi-05 for pgsql-hackers@lists.postgresql.org; Mon, 19 May 2025 16:51:39 +0000 Received: from mail-il1-x12f.google.com ([2607:f8b0:4864:20::12f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uH3iC-002iRA-1c for pgsql-hackers@lists.postgresql.org; Mon, 19 May 2025 16:51:38 +0000 Received: by mail-il1-x12f.google.com with SMTP id e9e14a558f8ab-3dc5a6c7212so9690435ab.0 for ; Mon, 19 May 2025 09:51:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1747673495; x=1748278295; 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=XTa1dJRigZ5fgZR8V6ksCUnObHVo+tjwSlHeck2O+P4=; b=nnvkbcfldkh/0UcbXYNHCsNt05bNCqLEAkewXp9a34QZf0A1OzT+TbX40XblmiPTCB IKlSQd1FnxEbG8iIEgz0C5BlR5ApdugIJKF5LhNWRyYO6aEvggVctRMu5dCka0EURlGv pWnRrIOCJPpwMzQ7MMp+5PrW6WJ0+4BwxQA0ChzAmksYwD++obHqXhRJT+XJjK45p4q4 mNhexvmrDLCISvR6YE9bpyhXCuvhuQnzodpgSq54dbCabNrAJHoeJ1FIfWB3953XFPkp 8Rb4jakG71O9/ePw7M/XdabgX0dQyPmyh/qVs4V+tF7yyWdLPli++qKvGvnom04yjDle rwtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747673495; x=1748278295; 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=XTa1dJRigZ5fgZR8V6ksCUnObHVo+tjwSlHeck2O+P4=; b=LB9Fzbn+1eYkR0STaEzSXXwwfacaN8wcdheTi32tYKT49BOpPjvcPn7tJ1aFIf5CMn 56HmzJs3dwxAVrww5k1c6CEhE1mETwCdI1nXtJnGVoY3xOA3iw6IEcQLzi6/SMSnFJe/ TTRUHiBl80bZB74QTNDHRee6ZSKdjzzj9JoUAcy3rfT6R+JocxL/pETkRrAqSJYJEIWz craUiFpHnUPqX2WDCa/Z0S3avtOCIw+byks/ZGD+EQ87gJrFEvTN9EjLWZ61L4A5QuA9 TSEm+aCJiQeqjvdvyS0a4kbWwKjfD1HpNfFUmO1JBAjh37JlGT4yssGEcS5YY+VkZq6q /tFA== X-Forwarded-Encrypted: i=1; AJvYcCU4StQFhTth/ldZVP8576zO80bcZGGfxmVat4IughFdgNMzwC6uS/e4QNqZsZTztjXuanlavwZD3H1JRnV/@lists.postgresql.org X-Gm-Message-State: AOJu0YxapdhBzNMsMZW/lOZ5RSdcqWTJARemCZOd2RtO/tp4Z2xnLeqV tYx74KrnAcyCcaARt/JK9V45PI+ojQr4HvtpTuZVvVST0CwJ3O28JLLr X-Gm-Gg: ASbGncuyewZR0ZxkdxVhiFNQmwlRHQ2uJ9VWVbq0ByIfOSrh5NdZu5Xxg6WS8VgDlWS uhnreaFKWs5YePZwbvbqSuLmyPyNZ409KP9HgxZ43t8HXTVGxK9htySgpkwsQ5BuZ2+Z1UI29rH uR/4klCzK3KeKbAPKud9jbI1eITeoND/N0a8aJjYyyuYDchCDk+cE5VFD76H9yiNPvOJr38nehH 9u7h/knrlaY2syTsy8lD8XIcl9MXBOfe/XRL0rZA2JIbectBgNbd9dqu255DSnacU1Hs4kqgXhM IUCcXAk7zUGgRJOe4PGHmo1HsjYB0KUzoEgAy2A4UELlD3CHt4luNYsvn2EpljPqFQSsvo+6WIW Bg0OkRMUx0/GZlCJUOak/vrekKP1XXowjWcRKWZjW60fI/UQjT1lg X-Google-Smtp-Source: AGHT+IE6fE9zM64h0wpAdlbClnesM4N6aJuvreSSSgFxthk1SQx7mHcNd/qz+MgCj3kNfqXgkyQuGw== X-Received: by 2002:a05:6e02:2409:b0:3da:7cb7:78c with SMTP id e9e14a558f8ab-3db84303117mr121917045ab.11.1747673495092; Mon, 19 May 2025 09:51:35 -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-4fbcc38aa94sm1752864173.20.2025.05.19.09.51.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 May 2025 09:51:34 -0700 (PDT) Date: Mon, 19 May 2025 11:51:32 -0500 From: Nathan Bossart To: Hari Krishna Sunder Cc: Corey Huinker , Jeff Davis , Robert Treat , Robert Haas , Andres Freund , Tom Lane , Michael Paquier , jian he , Bruce Momjian , Matthias van de Meent , 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=utf-8 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 On Wed, May 14, 2025 at 01:30:48PM -0700, Hari Krishna Sunder wrote: > Here is the patch with a comment. Thanks. > On Wed, May 14, 2025 at 8:53 AM Nathan Bossart > wrote: >> There was a similar report for vacuumdb's new --missing-stats-only option. >> We fixed that in commit 9879105 by removing the check for reltuples != 0, >> which means that --missing-stats-only will process empty tables. I'm wondering if we should revert commit 9879105 if we take this change, which solves the --missing-stats-only problem in a different way. My current thinking is that we should just leave it in place, if for no other reason than analyzing some empty tables seems unlikely to cause too much trouble. Thoughts? -- nathan