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 1vxv6z-00HGAw-33 for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Mar 2026 22:54:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vxv6y-00EmVM-04 for pgsql-hackers@arkaria.postgresql.org; Wed, 04 Mar 2026 22:54:36 +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 1vxv6x-00EmVE-1z for pgsql-hackers@lists.postgresql.org; Wed, 04 Mar 2026 22:54:36 +0000 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vxv6v-00000000gp9-1wgn for pgsql-hackers@lists.postgresql.org; Wed, 04 Mar 2026 22:54:35 +0000 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-b9358dd7f79so169746666b.1 for ; Wed, 04 Mar 2026 14:54:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1772664873; cv=none; d=google.com; s=arc-20240605; b=GstS7YL5tzSWbOT+qSF8IJhBHcyTXbyFw4oa6fvf2U/56J9y2YWsEVp7lDQj6fBRjp nplSXkCO2zcaBO1pHMMquI0PH3C4ZNIlv7p4TihX1McHewouTagcpsuK9vEjiPmPmRoz xMZbUt4SzW5oxIUVkBl5iV7UB7eNYbD78/0ecpq2aK85iz/WoK2bkdrpv9yWO1e1MV2K 5Ps7eOQWgTqnzgJ+bLdkXmbP2iiKAzgDxmELl3Mrg+/CMGIzCwD7PckdUr7Pkk0nnVJw m5yEFgobxFAFJmQ6MqNeDECOxrVnfK667JLqOt0w8of3+vb3TufACbglRZdF25ANWwLU nrng== 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=yMFtsFyAaBeeCpRjGfj1HU6SOhG8cn0joN3Hi+OAwJw=; fh=SKul/b6dVcpDiiUz54tho/oUZuJz/2+wRBm93vid5dA=; b=SEtjVs8FDTXg1EHaW8MEGduOaIO/tY3cnlnLAHPVo9ykUR4Q2dW91BcxC7JoetAl9o 1+4LRznEyHVrS9PZBuDi4R0Gg+8rTHAXYQ6vU77K1IUKhyduKWxhJpPQe1zuvwhbTLRU ZkLZddLKK5dbl/h4wFTqhiI61qXe67h8fyuuFwkqFKuqwcYB9JQ4QeaSUxjRoml/FeFx aD2kEhKw5Lj3k8OmZ3TiUiBRFztN5RXlp46ua61GfLYaCSyj0AEMX4jvmZOsZC36QgzF tkdQrcfT58EStmbBYfd50EI3xQKuiV5Z+rrMESnUOwVRUxULMioE4SBi3q7nnO1n4hs7 fBwg==; 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=1772664873; x=1773269673; 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=yMFtsFyAaBeeCpRjGfj1HU6SOhG8cn0joN3Hi+OAwJw=; b=PKvZU9Kl6WDwc58QpF5agER9ui0TSXklslhg9fmusUeigXLOMYzmtQ5ISm0rVAVSVk tw0y8arICX6zXbnOtQj3bMjastaGJZ96PoLQe7Vm7IU1GF/JBJIuZs7zDCUne9Bw5HMs sjrQ4jUzjVOBAtbSUPLFRHCYl5Lv7Y4QjH9xJ836oXQZvUrHOjJma92sfVKCHZK76MiB ACJEwAb7pmV5NZaDW28LhVetq9vlK5Kj7YKj26AF1Npyusd9CrypcMu3qBJ/jjOSg/GY twFSjuNNxgfzwWyb64mctMpchyjJ0m3fzxUeIQzgj32KOMgVUXez7jX6RfHTOM+vEt+J aKAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772664873; x=1773269673; 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=yMFtsFyAaBeeCpRjGfj1HU6SOhG8cn0joN3Hi+OAwJw=; b=XogaSzUQFOSTpvVoI9dGYeLBlx04NFek5QI4qHGezr3OLnJHIUeggerKHfeHV1L+3w XpNIe55CMTARf+JHTArKlLisUVUyGrjqNV151uVpsOBzuP80wkXyMisMgsM2BFsYil7i JGh5ogeAcIzroeuyroFcIPgJqCQL2PdKUyl95/rTEWVqepAkOl7hgVI0DcWXUF4dDEG3 NLVfsDdt/fzEmrZ8kEnEWGuGu5J2/Fz25uisRmQVe1NKblT2VQI8ueQv8E/eiWCaFOA4 nJ4I7OtoNvTavc9OuPpQY06dEgvldUtTOE+maed29zz/Hjc7Ib5T8THpcsmJzK152UCD 2v8g== X-Forwarded-Encrypted: i=1; AJvYcCVdtLnLDSGbyz4dy/X3HotE211u6FCy7x6MOr8x9zHbEScXj03A+kZe2+fnuJ/RKPcwMdKGfMX+s5OA0Khp@lists.postgresql.org X-Gm-Message-State: AOJu0YwAAry2bNoaLmtb16xyar13ygf1rDP399ZSBX6q9hXoWM7bclxf XU/6qv9GGV6dt8JDTqPmMfr9yYeB3Jtfv4NnXmVxdkEptsrUuwklIj+rzlE4djW2JerYaXdPwov 1xA7/JDIfKM9V4oNOQG76bBxCnDfzemo= X-Gm-Gg: ATEYQzxaCvGQs614fOp1xpJbHPj7VXrziEYYtAofBdXdXrHJO6rqQsaMmQTbD+Ax2c/ Kw8t9+u/BRYzNumh5PLu+TklKOPUwORlOg0BHDQad3gVuUU64lEKnEvrqd9ihTY+KgmlZc4QJ4G kciQbDJ1Me1QSHzCdx0eidzA5xEvpm+ELbPmACtY7wqeMtM5wuBA6tHtmh6IJ6qso1dDN9UCtU+ hhZ02htQyHiVbrfaA5DHszk6ecJhybl8H+zHzrKiB81aVPtj59ufiufAHfZ0UUiavnT5sljrxLr SUPKFw== X-Received: by 2002:a17:907:9487:b0:b8f:7aa8:d9a4 with SMTP id a640c23a62f3a-b93f11b4aa6mr224538466b.20.1772664872568; Wed, 04 Mar 2026 14:54:32 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Sami Imseih Date: Wed, 4 Mar 2026 16:54:21 -0600 X-Gm-Features: AaiRm53uJe3aq-BzSCeHUzn2zSmMlXBXlu2776xVx1hWjw-tUgWM9HwMSucidJ8 Message-ID: Subject: Re: Add starelid, attnum to pg_stats and leverage this in pg_dump To: Corey Huinker Cc: nathandbossart@gmail.com, pgsql-hackers@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk >> I dislike the existing "pg_stats.tablename", since this can also be an >> expression index. >> "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. >> I noticed in other pg_fatal messages, we include OIDs >> >> pg_fatal("could not find function definition for function >> with OID %u", >> cast->castfunc); >> >> Should we do the same here? > > > If I had the oid, I wouldn't have the error. :) oops, you're right. 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 Otherwise v2 LGTM. -- Sami Imseih Amazon Web Services (AWS)