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 1ugSfz-003Zpu-OQ for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Jul 2025 18:34:20 +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 1ugSfy-009ucX-RV for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Jul 2025 18:34:19 +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 1ugSfy-009ucP-HX for pgsql-hackers@lists.postgresql.org; Mon, 28 Jul 2025 18:34:18 +0000 Received: from mail-il1-x130.google.com ([2607:f8b0:4864:20::130]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ugSfv-001Lbw-1J for pgsql-hackers@lists.postgresql.org; Mon, 28 Jul 2025 18:34:18 +0000 Received: by mail-il1-x130.google.com with SMTP id e9e14a558f8ab-3de252f75d7so41049005ab.3 for ; Mon, 28 Jul 2025 11:34:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1753727654; x=1754332454; 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=e9CY9znI1PJ2N12JHnwi6o5Z5NaP2vg5wK8aP68tZpc=; b=WHscaln3O2Z7ZBbIlUHIOtOGyAh0LuPARXyFFsVDJH0muJfk2h69xxgycR+hdUjzem QJaRehmAe+EoVepE9ufq6Jv36DEUje1gIhaVBib+2fRcwSZJWxqfyf5XQr1UMqOapWEN aj0NI6c6zl0L3vczUF1a/7kke7ZWtFLWqEZa7JZhnmeFHE8/fC9TPgaqBfNmPf6hkzAw KB8us7jmWYcb/dPaAW8nZmzikU/BOr2QlrQNUmWXixLw21ereyeP8qTjq3qjpfs6zOR6 ChQGYsXlClHPhbPIn50mRz5Fv4jCHO1jg/7ZWY5r1lG0axhBy1HjmnQTXf3kYeJHPtlX rfDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753727654; x=1754332454; 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=e9CY9znI1PJ2N12JHnwi6o5Z5NaP2vg5wK8aP68tZpc=; b=sgHMVSNlYRK5ZGAgKYYwmYvYtY84vHSDIuozVZCLwGRRs89oE3CzjE4kaE/U40In8H dHijyrfRl1xXfzBg6B3kYWy5UjFuADy6AFdmBJzvfmX88egLE6FN4Hcg0xReK6sHF/+F rY/IBx+0S71tuvd5XwrpsHBtZQI/XkBe9w3WjQUoJoYqlkqOjZM4g/oUmYfeU7mwvZ4h XYRFXcAh1HaOl/DozoIWssGUhw4EE5S4bU7UgHTIVVkREvnUtHkfCEq8pkbTS6qdapY3 bIAWsarb0RZcNbcA7Qu9mOn6CT7GrbpKfOiT5Ah/B5+NWg6auo7HsY1GJIlNplQCzYtJ uFxA== X-Forwarded-Encrypted: i=1; AJvYcCUK2kaNw8qC7LIW084GbSavFODDlx1IIDJLTI7SnLD84X2ZD0dRDu3p4cIB0c6knOmQOAEiikB+/q8MBjUW@lists.postgresql.org X-Gm-Message-State: AOJu0YzZi1L11CDaU781gEXFYkynaFhvR5o+FsF95ixyGz0xUlMPnXny WfWfUbOg57Z9khxc/pPGK8HIjDKaek0Yfa+iKOkOWxqpK10bofjsA2vR X-Gm-Gg: ASbGncsQvUwB+cBrZiHOln5JqQIFCuaxJeKntZNnHLSGW+kxCSRf6LQkoLvo5so9tmD RfYVUtHrf2vPL9UXEGzmwwGHdehUop+Ffswf9tX2LbT62hpan6sUqFRrrrHOAMjNFM+/NkLjJqe 0i1FllBQqzJW8+3bI8s2WZxr6rzCpaxhouPPykm3TCoyfb62tU70cMOb5+pfwYVnb74Fp5kYZuy KpRyehhzvDsSMFXH8zE24lQnutQxb81KPWqCvBMy6RBBfyum8t2r+9PD7MJWOjPkA9mhAQqtoLV H945XDvfMjsgOysb9nw/LqAvFh4XtGDSSVxNkiUXh5452HEYM4UFLp32UoZDUzbU8ycsVj7GfQq IvkUhffCFKOHWC1neARv1VSiPMuYQbNKH0MGOqWp0eGwIELnoCml3ZruMr4nH3rT/r/HfKy9WtF P69v2IHdqbqca5 X-Google-Smtp-Source: AGHT+IFVX4LJRJEm3uwNF2FeIs/Nt49R0wiWdTQkCm0HEZrji/3bhl+6+2mXkwbeEv0UjELFf7Gsdg== X-Received: by 2002:a05:6e02:1908:b0:3e2:c6e1:7713 with SMTP id e9e14a558f8ab-3e3c52e0182mr258413815ab.18.1753727654050; Mon, 28 Jul 2025 11:34:14 -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-508c9342655sm1965128173.71.2025.07.28.11.34.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Jul 2025 11:34:13 -0700 (PDT) Date: Mon, 28 Jul 2025 13:34:11 -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: text/plain; charset=iso-8859-1 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 Mon, Jul 28, 2025 at 09:22:29AM -0700, David G. Johnston wrote: > Makes sense. This does beg the question - what happens if a column is left > with a lower statistics target than what would be applied during an > analyze, but one is present? I donīt see where the statistics target is > saved anywhere. Can we start recording that piece of data and teach > analyze in stages to just never go backwards - reporting any it had to skip > to adhere to that rule. Seems like a better policy than missing-only. That would involve changing the behavior of an existing option, which has thus far been strongly opposed [0], for what strikes me as a reasonably uncommon situation. Plus, --missing-stats-only may be useful in other situations. [0] https://postgr.es/m/Z6KKHX9PZkB19lAK%40nathan -- nathan