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 1vyFUo-00HZ34-2v for pgsql-hackers@arkaria.postgresql.org; Thu, 05 Mar 2026 20:40:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vyFUm-001GSO-2L for pgsql-hackers@arkaria.postgresql.org; Thu, 05 Mar 2026 20:40:33 +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.96) (envelope-from ) id 1vyFUm-001GSF-1O for pgsql-hackers@lists.postgresql.org; Thu, 05 Mar 2026 20:40:32 +0000 Received: from mail-dl1-x1236.google.com ([2607:f8b0:4864:20::1236]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vyFUk-000000014Mw-3B5j for pgsql-hackers@lists.postgresql.org; Thu, 05 Mar 2026 20:40:32 +0000 Received: by mail-dl1-x1236.google.com with SMTP id a92af1059eb24-1270ac5d3efso8452674c88.1 for ; Thu, 05 Mar 2026 12:40:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1772743228; cv=none; d=google.com; s=arc-20240605; b=J1QvEFExTc5UD//VN+koozG82ip+seYAzxDIOfP6s3FKxwkPNWyDm8nWNAOohsO8L1 l39VMDIZAjjGVjjBuiMx3FKIKIViX7FZsVrW2I76FoyURsWGxaLHg0fHkEXMGY+LZdZj zEX7ylxc7Zn9B4HGVdefdKAv9sBBEKaqMxz1W6qywf4AeQanIWLrX5Wke9GbeycG0KOd 0aD/ZmYdjGS+TNt47WoUyrGX/5VkcTpJG6VvkmTBfv83i4t970kWn715/1HExnWM1KGL Gmq8J+THz97eAdxegPv5RAnRoyXoATRuVuttblPT6geY1ZhSgmnhcAoizFNYA24oorKK XPEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=X3rsOZ6QfnZ5WyBK56NNx5moJm4wFTAbqdYbOco0sJA=; fh=V2VjIJyFtrGY85KPN2NETyUrGKT9+imPQPlnGTM3EtU=; b=i9FW14sAbWrNtPHWMrVosP+UsvjckdJb+9UfTA4qOwoKTglI1tlMRxl9kh0LtcJlSV 5KqJynXwyPWD/FskC+p5WCMx7wSTP1wS7zdgX02Pf7Iv95IvPLFFP3WcUMyADqOfWOae pk/RCBJV2J7OLg9buHuubVd7OMQjxPM9uey3gVw22kvnF+rRWDsW+XY22Aas1gBlG8JC vyUbELwphekIRmvntRXL0998a5mBEplU5faIy4Yl+f3RlaFeRb/WgQdJjWzUTF0B93Ek M+qJcJAAP0Z56SbAQh2aquqeX5+FTu4aV1/l9uL+VOEg4/p0Jz6MEETySLSdEAYvOSVv e9BA==; 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=gmail.com; s=20230601; t=1772743228; x=1773348028; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=X3rsOZ6QfnZ5WyBK56NNx5moJm4wFTAbqdYbOco0sJA=; b=OxRJM9M5qcfz6U20Hq9s97hTP+nDR5NSGJIAV5s6a5PGzxra3CZCWD915QX2BrU5OU DDRYb5UNhJFwUZx8jhrcJxFGbKH1cgX8B1FM2rA+i+c8qRe045Li6KNuTg8ND0uBncfs CJYRg+nqsdF6nP41aFfcubbpuwXcAbTU5tXhkaKIN4nuyVwb90+KT04c70bi862xpeLJ 69BkkCGrahsaOZNhCL//5MGAUyRGcQDtgdDVTeJS8q8/VkGsV1TZM5WyU1VUw3ddVLN4 wvWT8e9HxCJ6QlG+Y4QRBXH8Gdz6v9UhRqF6cDagABXZhJtEcG9sheBTOPoR6Tst048N c4YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772743228; x=1773348028; h=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=X3rsOZ6QfnZ5WyBK56NNx5moJm4wFTAbqdYbOco0sJA=; b=CvV7ZAG5qLECTpgKexick++YDlnTGMdEUkeeD50m6SOoL9NzyLE5cRKUIxUNxKuWGY PP19LtBDTRSDWOH1vVK0VCR3FL/ZcpwJDnv1IycNbN0kH6TX+0UXvuUVSsazhGt8+z4y ogwHs7yO7M9+znbK2Ly56OV2ZkVVNUzv3hgq4MfJ9qaIf/mcN0+Uby09ShA9nqSDh3gi pLYwqDGfO28ihKh5+pcv4/9xvigbgCUS8WlBTD5+hRB2LRA76KgOEgmAaZGux99VTiX1 ci2JawsIjbpVK2N6ueFZDIsMAtmVrlw+fTTCYu/WsjlQJygc48sTDr0j5CX5SKKtPtrT E4ow== X-Forwarded-Encrypted: i=1; AJvYcCWr5kAnkZe8vtMCc4GY9KgOLJcfaEo998kdKTJF4RVISZ3V0AEdvYXGNY15jqS7595iEG+TCZZ4yhv/oTOh@lists.postgresql.org X-Gm-Message-State: AOJu0YyyqyQI9V4aB9faVVcW06cvV5hzR7pmq4nuyGaDwcF6nMJFRUjW zGtJMgxm/79AEZuguTIHmaOudcUTYfh3IMVCjW5K3kJnLE9LRi0ZN3bBQpy6TdjnUcuqyf2taME rZPScv9MeCDpskG7ubTaA863Ns56gQMM= X-Gm-Gg: ATEYQzyJjGzErdvuIzeptu5j7woY+0vGu2UHiZtImt/MTlLR+lz1RnOxwdaTAEwc7Gg mbhI8T4bHGYDAxS0kSAV9VlVYdn0BrJqdWfFkiUZUqs8vCFU8FswzFFnorkRtV7pws/OWr4GBDV TokiiqMgviEc1fW9D+N3V/M06kdwWW+G5iHZMs2HykbKSVBy2/YLZ5911IElR0kTyaQkasqkIe5 xAgEjxmHnMvVoTDVxeXWaQTIgr5W7JLa6bwzc9qf7kzITNc5tlvUcCjMSPc6GjN8/PPFFPkx/eD UzB7R/YtG7aDN531w0+tFFPv9qN0vRJtIy4yUPyKyZ3/SbH6Bc16Vd6Ydsm0jMsWIUJEVRd7Tov OAmyR+y7aSDVAy2JBASsHiM6N X-Received: by 2002:a05:7022:e1d:b0:127:9e95:a2f with SMTP id a92af1059eb24-128b7078376mr3303689c88.2.1772743227594; Thu, 05 Mar 2026 12:40:27 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Corey Huinker Date: Thu, 5 Mar 2026 15:40:16 -0500 X-Gm-Features: AaiRm5342g0T8JPKJJgoOT3loQGApSfXDMhylvHh8NXPQZW6ZdeoZDReLcUuZPw Message-ID: Subject: Re: Add starelid, attnum to pg_stats and leverage this in pg_dump To: Sami Imseih Cc: nathandbossart@gmail.com, pgsql-hackers@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000005bdc15064c4cf22f" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000005bdc15064c4cf22f Content-Type: text/plain; charset="UTF-8" > > >> "pg_stats.relation" with a description of "Name of table or index" is > >> more appropriate. > >> It is a change that we can possibly make in a major version. Looked > >> through the archives, > >> and did not see this being reported/discussed. > > > > > > I don't see it changing in any version, minor or major. > > This could be a separate discussion as it's not the fault of this patch, > but clearly "tablename" is not correct here. > Certainly up for debate, but changing it would break existing scripts, and that's generally a non-starter around here. > I noticed that you changed the tests to selecting individual columns. I am > not clear as to why this is better? > > -SELECT * > +SELECT schemaname, tablename, attname, attnum, inherited, null_frac, > avg_width, > + n_distinct, most_common_vals, most_common_freqs, histogram_bounds, > + correlation, most_common_elems, most_common_elem_freqs, > + elem_count_histogram, range_length_histogram, range_empty_frac, > + range_bounds_histogram > Well, the oid is now a part of the view, and that's not stable from one regression run to the next, so we have to exclude it. --0000000000005bdc15064c4cf22f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
>> "pg_stats.relation&q= uot; with a description of "Name of table or index" is
>> more appropriate.
>> It is a change that we can possibly make in a major version. Looke= d
>> through the archives,
>> and did not see this being reported/discussed.
>
>
> I don't see it changing in any version, minor or major.

This could be a separate discussion as it's not the fault of this patch= ,
but clearly "tablename" is not correct here.

Certainly up for debate, but changing it would break existi= ng scripts, and that's generally a non-starter around here.
<= /div>
=C2=A0
I n= oticed that you changed the tests to selecting individual columns. I am
not clear as to why this is better?

-SELECT *
+SELECT schemaname, tablename, attname, attnum, inherited, null_frac, avg_w= idth,
+=C2=A0 =C2=A0 n_distinct, most_common_vals, most_common_freqs, histogram_b= ounds,
+=C2=A0 =C2=A0 correlation, most_common_elems, most_common_elem_freqs,
+=C2=A0 =C2=A0 elem_count_histogram, range_length_histogram, range_empty_fr= ac,
+=C2=A0 =C2=A0 range_bounds_histogram

W= ell, the oid is now a part of the view, and that's not stable from one = regression run to the next, so we have to exclude it.
--0000000000005bdc15064c4cf22f--