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 1tZxBq-00EfPx-QA for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Jan 2025 19:12: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 1tZxBp-005Rkq-Uy for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Jan 2025 19:12: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 1tZxBp-005Rki-I8 for pgsql-hackers@lists.postgresql.org; Mon, 20 Jan 2025 19:12:01 +0000 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tZxBm-000b4w-30 for pgsql-hackers@lists.postgresql.org; Mon, 20 Jan 2025 19:12:00 +0000 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-21670dce0a7so100961735ad.1 for ; Mon, 20 Jan 2025 11:11:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20230601.gappssmtp.com; s=20230601; t=1737400318; x=1738005118; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=WH4fCh7O6T7eRmhxp9MuP2X6s/rA9pE6B3Ujk4oTmKM=; b=v5OLFQ2gDiN65RaS5jXHxwyMANwrWnde4KIkweXlQqu/M3KdRFUl11p09kz+A3IjRW 5UJPaws3Lv+ZUXYeQQxoO9J4IqCWzttm4nIAGwq2aNc09l2zvFwO/zFWPVGxpfcgbJ+v +7hRY7QSkRkTVXcPTFU9OrU3S/D7s0bsv8Ml3Tlj7cuX33N/GFRnXjCMtb0U45CssmCs GX2fsmU9PLJccjMVs8c9kQKIOelDYWZedHA2hZ+fCz6Uj9Yy37ldhsaoONKsKm5oeIUK CM+Ruw8G6RFATmA3ODNucOOFzr/qpBCqLiDQXXVkjDaA3AMsGCV3gM0EzSzc17Rlw4a3 olcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737400318; x=1738005118; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=WH4fCh7O6T7eRmhxp9MuP2X6s/rA9pE6B3Ujk4oTmKM=; b=OryVWI8b1NRxxcOgD2XgCmxGbbVNbqlmIcfXN73T4KAdVCtie26Z6s1pq2c1eb1i5Y wVHg1lBqu+x4OSNXYXEM7XZ+jK/Ktlja84ub+nA0gg5lmQw3mGUHe2IoSCbuxoeMMb2F W2AgsvueAz8hmBkMb8c7ck2iLs+vZjbNmiDCfv77TbRrf2neyuWVHLGo+gLpxEoHND7T oioNu965NEAYG6VlfM1PQl5jwVnT2/x3uuCOq7UcicWi5OOmAvO3gAJN/ZbMglNkvnXZ oN8YTCa50964YNSIAwNwqWc6XYLBcqcBzMxhT1kBckFQgRmtTkuo/keb1j1rd4PlUh2Y Ozug== X-Forwarded-Encrypted: i=1; AJvYcCUo49AETC8og2UTWhi2dmiiPBTCZFtlkeJHQoSDwhjerL8flQFkJvQ+CUcDTmBATKtNdgckC10mrNhLIv2x@lists.postgresql.org X-Gm-Message-State: AOJu0YxDBSV5+KPUSyqYHF1cjLRxjuHe2nns7n3RKqqgwWUfb+djaBYc MCmzHrG7RmpmakaNmjdc6nZCEol04x4pbmMIztx1XF+e4mXphV8hP4uak5kUuA== X-Gm-Gg: ASbGncucykq62rMDKM9WYEzAWkgMA6+7dXIyxXIU7MjnlwFlpRLY3ysTvqpnkfCobXQ U8nEpdGz1qQIhiWD5qRJqcz3fQUMZJok0bTNFDYQ/1WvBFMvdNd/Dj6cmWPeZz+P38yXm/i273U 9euqFXZJb6WyzoyoxaXmJE4nZN+sHdC+rI98RIgBsqO0CBBT6Ou3IDmCUYcnuBYQwuDCG/2r9fc ZBe75szsTjkU1ACl56QAdn9cCwzYsPR9mn9vgU2rd3z/XIZ38hoNDF/CxTejbHfWOdUFF4Vs9fX YhwDRcxcHpVo2HHs7h5BIGdBklFQ0k/+rVYm X-Google-Smtp-Source: AGHT+IFes9vazIrkvaOG3fhx00h0/HK1z0ul9MK3qHNkydCBFIz4UzjQoVXAnnGW9l0p5kD43zZktg== X-Received: by 2002:a17:903:2343:b0:216:2477:e4d3 with SMTP id d9443c01a7336-21c35609818mr203737415ad.51.1737400316926; Mon, 20 Jan 2025 11:11:56 -0800 (PST) Received: from jeff-laptop.lan (c-76-102-242-158.hsd1.ca.comcast.net. [76.102.242.158]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-21c2d3de25asm64378995ad.193.2025.01.20.11.11.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jan 2025 11:11:56 -0800 (PST) Message-ID: Subject: Re: Statistics Import and Export From: Jeff Davis To: Corey Huinker , jian he Cc: Nathan Bossart , Bruce Momjian , Matthias van de Meent , Tom Lane , Magnus Hagander , Stephen Frost , Ashutosh Bapat , Peter Smith , PostgreSQL Hackers , alvherre@alvh.no-ip.org Date: Mon, 20 Jan 2025 11:11:54 -0800 In-Reply-To: References: <5d3a24216d15ce8a50d0fc085a13a410202014ca.camel@j-davis.com> <3bd40d2c686608196b8e04c2aaac9c57c447aae6.camel@j-davis.com> <39770e3aebfdf543fa2215fb300621a54b1b2634.camel@j-davis.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu2 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 2025-01-20 at 10:58 -0500, Corey Huinker wrote: > That is where all statistics were previously. Others felt very > strongly that they should be mixed in to SECTION_DATA and > SECTION_POST_DATA. I believe you are referring to Tom's statement that "it'll be a serious, serious error for [stats] not to be SECTION_DATA". The statement is somewhat softened by the sentence that follows, and slightly more by [2]. But it's pretty clear that SECTION_POST_DATA is, at best, an implementation comprosmise. The reason we need to put some stats in SECTION_POST_DATA is because of the hack to resolve MVs that depend on primary keys by moving the MV into SECTION_POST_DATA. (An MV can depend on a primary key when the query has a GROUP BY that relies on functional dependencies to be valid.) That's a fairly marginal case, and one we might be able to resolve a better way in the future, so I don't think that should drive the design. Reagrding [2] and [3], we might need to reconsider the behavior of the --data-only option. I asked for the v38 behavior out of a sense of consistency and completeness (the ability to express whatever combination of things the user might want). But re-reading those messages, we might want --data-only to include the stats? Regards, Jeff Davis [1] https://www.postgresql.org/message-id/1798867.1712376328@sss.pgh.pa.us [2] https://www.postgresql.org/message-id/3156140.1713817153%40sss.pgh.pa.us [3] https://www.postgresql.org/message-id/3228677.1713844341%40sss.pgh.pa.us