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.96) (envelope-from ) id 1w5ZI4-003Nip-0v for pgsql-docs@arkaria.postgresql.org; Thu, 26 Mar 2026 01:13:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w5ZI2-000Ktb-2V for pgsql-docs@arkaria.postgresql.org; Thu, 26 Mar 2026 01:13:39 +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.96) (envelope-from ) id 1w5ZI2-000KtT-1J for pgsql-docs@lists.postgresql.org; Thu, 26 Mar 2026 01:13:38 +0000 Received: from mail-dy1-x1333.google.com ([2607:f8b0:4864:20::1333]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w5ZHz-000000013tQ-2vwe for pgsql-docs@lists.postgresql.org; Thu, 26 Mar 2026 01:13:37 +0000 Received: by mail-dy1-x1333.google.com with SMTP id 5a478bee46e88-2b4520f6b32so564674eec.0 for ; Wed, 25 Mar 2026 18:13:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774487615; cv=none; d=google.com; s=arc-20240605; b=DR5Erl5gC+sQAK6tQJdihLVNguJXUnBpk+0yfXT12eYvTmkg5kg0KHKrvjN56f5GjK VmEq2G/plX9VkVBQR8mOkKTyCV6y1n/aHbKqsFhrS83cRrthoFbdxWQDg7OVQD+MHPte 9y7oi6dzUvnM9kEdd/hRLEh2EsiaPSBMzCA5wMbpyCBgdYoQOU6nDuryw1xXVT1xRkmK sOhntyrdUswTBp5FH4phY5hxrtjKnauU8y5oz9U3X318HI9s/TOFrIC7nHUmjC43q1vL /PEdgprkJfrd7PxIz6v/6tkdcnFDMREQaiJuocwWzBbGFq66GnETuQ7DsPvZZmdmc3fo of5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=G7WoBN09cqTL+3mL95Va5hdg7GhCWrKIqbLJ4tyCbLE=; fh=i/fJCosK8DcTjR4hRGptng5Oy+lfyCKgCSBR15I3dsk=; b=EljYZnIOmO1PTiCbMGoP394y/NSZQCbBRDLbeYExXO9dB3NEQaqAeGQqRKnCFRZnTV s8vDbRjNXFfGIetNXukefBtnBdgML7/C2YsyxCVWl3/frK3y2ML/MNjKU+8WmdhKO0Cy 2N459pLBnQaj0mttzTiNiRCt0qkyTpngQZfc567ixbpyZD+J+b0N2kQCRmrOPIl7YTHK owLh2xvxh8ZTnlNqko0m7i/A7/+5IrhIoyWLSoZWJT3MbBoTEmyWR8kV1XUcwRFZtoxx hR5m9egn9+iUKVJsgvKiXt9htD8ytMH3EsssQGRk1GzxpqgT/vDps8tL1UdY+J+X7dNv +9ug==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=postgres.ai; s=google; t=1774487615; x=1775092415; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=G7WoBN09cqTL+3mL95Va5hdg7GhCWrKIqbLJ4tyCbLE=; b=MFFjK/ZDFsAqpclKmBQLJm2/0wAvIFOBKexDVb3L9mLwgsf+uX1VvFklxA2n3JToBk l7BlGdDU0zOPMKRHRFeQYgpmuMMcmd1gtFJ1cTN681XEE1IUIkqwWb7MXC+LzVDrk29R U+tMuFfjv8Y5u6I5AXpn7eQ+0fnmbUCRt2ghDVSc3/ZYwEtzI8eBuar/H0Z1WXfrOIo4 kQStX1GrEJnTvCIf4gx1ghnLNjI8+kNe5OfnGw/7yPrTgHeSpk5isri2mgb7jsqmIfjn E+ptAYd/kqi5MwwDBgqqd2z2s9TEPpfajDma6vn53/64fmEMoqj4Kw61PtsMNa9T18LC GVoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774487615; x=1775092415; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=G7WoBN09cqTL+3mL95Va5hdg7GhCWrKIqbLJ4tyCbLE=; b=oDuhVUgCU4OlkFnOlHa/CjWWGXp9j8kBp1dIbob3cG/fPCQFlMHugnsDmqRquMKctJ e4bgNuWkZa5wWv7M0IVLlKXCnPPwy6EmZZRI8WyY5iZkBr1Hl1UK94lHr6i4Z2I/rQ7B KjjCRSUI+xLakjByo1XVZWy8BAeN5GwSj0iKRzZgTWE9QoTr9CAf83Z5x5xDBoZ1I/td M6X4f7Mkx+ZRxX12umHJop6+eRVIyw0Js1CROksuYUQuJsgorqiL2OmHgZM6OombUNbl zNzwZCdq07yA/AFAo8HvUJiLo3V0ulK9inm+SucCHRJrlyCNegb/dMjYaYeNo8akwQYc pqDQ== X-Forwarded-Encrypted: i=1; AJvYcCWLuuwh9umUasLg3BQzoGmWjEX5VaAcot61OreTs3WFM6/Rj39TreOM2TfcGpsb1cK45MPE5TGPpCEP@lists.postgresql.org X-Gm-Message-State: AOJu0YxVojc9SHRO1mHQ4n6tBVZYXH1HOVSMlMSPdLBAKjVem/cyQajN 7CMgte2ZBpo+3fSLtk20QaNiL0xKQdtus4qsGUuivJV7xlsv1O2a/XbPh+KoDZzt1INp2N9uR22 XnWCQmDYvd7jF5CE++2YnyWJNbXoZE05HZLpgsfQxeQ== X-Gm-Gg: ATEYQzzX4B1AftApv6o/bsvHPhVBHwKJ0k1/wPWY/1RunmcrsYnGkE9yR3Iq0EL5JoS HK/arLWw4wpmnKvKdGhPF15E3LLhcUotUs7UuslrI11g7IG86lwDhxgBY/zkLx1w0VU6Xfjc4Q0 1y4EWAJZx+Go4nHSrViXpwebKIy82YBjA68iddJh5AMgrNnka0Unj6UqUWiOdtUI8tWS2OEdOFm 6bZBl00kewuTJRIGoSrbJICNsdEb5QZ0OgJCfchDW51yYyDVIhXyBiZG5XpdJialkxrSJsJRZ/x 5NC5824L X-Received: by 2002:a05:7300:3251:b0:2c0:c5e4:6057 with SMTP id 5a478bee46e88-2c15d3da9dbmr2870063eec.19.1774487614637; Wed, 25 Mar 2026 18:13:34 -0700 (PDT) MIME-Version: 1.0 References: <1a7d3c03e6169e6340f9d77667433fd0cc5f5897.camel@cybertec.at> <48ad7007c0bbca725847473fe410cdda5753c65d.camel@cybertec.at> In-Reply-To: From: Nikolay Samokhvalov Date: Wed, 25 Mar 2026 18:13:23 -0700 X-Gm-Features: AaiRm52s68WxK0jge3UZOSpC3BDM-I-X3OWyHlKsoxv6e36xR4NWTzwBXzZwxBY Message-ID: Subject: Re: [PATCH] Doc: clarify that pg_upgrade statistics transfer works cross-version To: Bruce Momjian Cc: Laurenz Albe , pgsql-docs@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk two cents: On Wed, Mar 25, 2026 at 9:21=E2=80=AFAM Bruce Momjian wr= ote: > > On Wed, Mar 25, 2026 at 07:03:01AM +0100, Laurenz Albe wrote: > > On Tue, 2026-03-24 at 14:11 -0400, Bruce Momjian wrote: > > > On Tue, Mar 24, 2026 at 05:53:27PM +0100, Laurenz Albe wrote: > > > > Bruce, you are confusing me. Your first sentence suggests that you > > > > (erroneously) thought that upgrading statistics only works when upg= rading > > > > > > Right. > > > > > > > *from* v18 or better. But your last sentence suggests that you'd r= ather > > > > not add anything to the documentation that could dispel that miscon= ception. > > > > > > So, we don't normally document cases where a limitation does not exis= t. I see it rather as an undocumented feature, not an undocumented "limitation that doesn't exist". > > > I think the logical place to document this is in the PG 18 release > > > notes. I am still confused why people, like myself, got this wrong. > > > What is the source of the confusion? Just unclear release notes? > > > > I understand now, thanks. I agree with you in principle, but I wouldn'= t > > see that as a hard rule that should stand in the way of clarity. > > > > Let me quote a precedent from https://www.postgresql.org/docs/current/u= pgrading.html > > > > Minor releases never change the internal storage format and are alway= s > > compatible with earlier and later minor releases of the same major > > version number. For example, version 10.1 is compatible with version = 10.0 > > and version 10.6. > > > > To me, that clarifies that there is no limitation to performing minor > > updates with a simple restart. I think that is useful information. > > Right. > > > Perhaps you'd feel better if we phrase it as a limitation: > > > > Transferring optimizer statistics only work when upgrading to Postgre= SQL > > version v18 or later, but there is no such limitation to the version = of > > the old cluster. > > > > I like my original suggestion better, though. > > Uh, we added the feature in PG 18, so why would we say it only works in > PG 18 --- that is kind of obvious. I am still asking, why did people, > like me, think it only worked for _old_ PG 18 servers. If we find where > that was communicated, we can clarify it _there_. If you don't know anything about implementation, it is natural to expect that something new will work only when both old and new clusters support it. That's why I started with words that I see everyone (includfing both of us) were originally confused. I bumped into it in some blog posts and LinkedIn discussions after which decided to clarify [1] since I couldn't find clarification anywhere on surface =E2=80=93 only in source code, diving into implementation, and the depth of discussions [2] [3] [4]. It would be great to get it covered in the 2nd (after source code) source of truth-- the docs. [1] https://postgres.ai/blog/20260324-pg18-stats-upgrade-across-versions [2] https://www.postgresql.org/message-id/flat/aC5F1LX6-uL0wRV1%40nathan#f7= 1f3dcd5fd88ee970f0b1ea0a779298 [3] https://www.postgresql.org/message-id/flat/1322262.1741643606%40sss.pgh= .pa.us#d666e5e99bbd955a4f258338b44389da [4] https://www.postgresql.org/message-id/flat/Z_BcWVMvlUIJ_iuZ%40nathan#1f= 6ae665591cb5e5371552761aa90615