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 1w1wYX-000jtO-2L for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Mar 2026 01:15:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w1wYW-006fyc-1n for pgsql-hackers@arkaria.postgresql.org; Mon, 16 Mar 2026 01:15:41 +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 1w1wYW-006fyU-0e for pgsql-hackers@lists.postgresql.org; Mon, 16 Mar 2026 01:15:40 +0000 Received: from mail-yx1-xb12f.google.com ([2607:f8b0:4864:20::b12f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w1wYU-00000000LRo-24xV for pgsql-hackers@lists.postgresql.org; Mon, 16 Mar 2026 01:15:40 +0000 Received: by mail-yx1-xb12f.google.com with SMTP id 956f58d0204a3-64ad9238d8fso4444047d50.3 for ; Sun, 15 Mar 2026 18:15:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773623737; cv=none; d=google.com; s=arc-20240605; b=i6pF78B++K1nur09fA/eGWSCppdxlVkAzJOTZMVShunnZw79q49oluvLrcKb0oMqUl yJQXJeu7L64jhQRLSjwYxua43GDexYa5CiOrW7z8dai2cFhT+LLQaLF5tAzZDbGV+vX3 IiUb74LRxewutpHyQb6+hlqRt15YDzMyhpzipnRONhPgpFiXsHr2qMBsKO20joJ4ITNP iSGCboqarbSFbAMUK4IxrDBP5r7OhYjtWbY/bfFjQxzKH5H79/e8cCLHrcHktCAj2Tzu qejRfKzypC36rk1GhGjduhHf5O/GQ36FsMFo9SsmuDYDaIK6wZZz9dkaOX22w2eaK0KP xC9Q== 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=+/BEu5uB4hSmJ7HFfC4/8Wtc3LH9jj8qebQps3LVgSs=; fh=SUVclJrvgewaRMIDhD3TPk02I3ZDq751mWAfH/F++Fo=; b=k6MOc5oGhr6q7ZdfIPawKGEmK6i6XHGOhQ1nHGsbDvX6MpC1qZ/x05ui5D6lDvfyov 6bDo6SQz9vyh13fhGVCwVe6cgu5r/C2RL1Lm113hWL8gUuqCX9yYNEnlh+VVu8koBEkX l4V3OXKoaq4zaz+dc8x4d5TNwVdiTk9i0l+e9nynxGSnoPldMvLbxh6rXk+MywYbSaIQ a+nJ/3QpSodMPnTyw3pLRCLs7XJzFtEukbC9FUgqKbofqEK/yMlRytA7fpQGK0NwlE44 f9tK++WsSxdEqo4NpkdWRYZkAYMxtrpB3hwNQXhEOLow7DenxxNVSVih2cOc0AlQ+4oL H//w==; 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=1773623737; x=1774228537; 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=+/BEu5uB4hSmJ7HFfC4/8Wtc3LH9jj8qebQps3LVgSs=; b=Ewo3jCfTtcM6urK+ka+XsdU/zU/oQToFdu4Xh6YR358+Xcdzj8J6W4TTOezpWB9bUL qQdLomLdMaqCYL+J5nbIsQx5r2onTf0t5i7I/+OK0vI1INJjVSCBhYYW4sm2NSpNZSSH dwRzlY+uNMWuG+8DFvQbn3SQgHLNEvqx1qXPjjRlV9kdNG3j/gOJesLlEm4ra8O33NkG V2uGdU7zBO5T2wegxd13i2XctAdL+Zk0CWt7aYzc6RYz2NTm+8qK1KwSYtXIiv33y8oP ml2S9N/aZAbh9Eyt1L5f7j3F7D5neAdMijLyrtpuKth5uYsQQM3bkLavkgj3aVNEbWcf eRag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773623737; x=1774228537; 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=+/BEu5uB4hSmJ7HFfC4/8Wtc3LH9jj8qebQps3LVgSs=; b=PqA4SXUV//HyvD1qsH4NbIpbDehUYfp94SoZ0QZEMwR3RvGejFYs6TkkHOGkdM3+6n TV50ZIAPDp+0qYoII9rE8r1nNt9HskZlA71ICvCkTB9Kay+6l0YTwwrH+Y2oBbYzUpUs h4+NRQY3lr/DBw3vbXnzhynN6x6JixOHkKuDVHL6Po8WhlS8yTPHs6UCLiToL4RGGea9 lcqrnEnT4VdlgHseNwGVBjg7JHiTiz/bRVyfxV4xi4LIHi30ijDxPkXuGzV0M+eXGYmJ VoQqkN3HHx8dkxT47lOCwV7zG5HZUf/d4AI2voXjcjbeb1/UJlRpHBBiasceM4tAuoMc Grsg== X-Forwarded-Encrypted: i=1; AJvYcCW89ToOCdCITqRluOXD1VS97WXdvFnTlvibhPxRbDy6GVQcoi4ppfAZiNyrYYIPrzctPwXPFLORx13x7JJG@lists.postgresql.org X-Gm-Message-State: AOJu0Yyc2a2AuKfj8PypsJYy7hn1kd11JHI00fdc3WO5bZNbUnydJJ0y C6um9SOfVBiaru0Oz09IQ5VcRBrX1AnJjiEA5VjWxm3iZ69fKMA3IoIwzmFeu7bPC3yYnUzMpBf VVWqd74GOGinnjSH3wHxWGDcwyH7GwWI= X-Gm-Gg: ATEYQzza/H2XGWBmujSNd5vtjdNaoHBYkPePxjNopetfdDpD7zsRzI+diIM2HEtM+YZ efLKtvJfLbLWAtP0boRMnw88Qbfu/XUmiJ6p8gdqQC71GgRCm2Vf6d6kIxdDQdcJk5Ntbfw3WyA Bbt3N58Y4lNieOlI1K6SayEUXCLBgU+uXjPvOH84QlNRjJyxjajSzPpLvSGuPfsk3tEPDoUithA f19xB90bkW1uMu5Kz/M3coiJ55z9uJq4o/HTJCzYUBE1OM4cyaR45mxm8d8epnPXd/T8F5Yez6a TcPQP6GEzdAPeWz0Bg== X-Received: by 2002:a53:d111:0:b0:64d:65fe:8b5b with SMTP id 956f58d0204a3-64e63087143mr8495165d50.69.1773623736987; Sun, 15 Mar 2026 18:15:36 -0700 (PDT) MIME-Version: 1.0 References: <2119849.1773605379@sss.pgh.pa.us> In-Reply-To: <2119849.1773605379@sss.pgh.pa.us> From: Shin Berg Date: Mon, 16 Mar 2026 10:15:24 +0900 X-Gm-Features: AaiRm514ZdOSNnSgjNsnQmRStLsAe1LDHrZXOGynvpKzdbl4wwbSNV45-YHbHUQ Message-ID: Subject: Re: Inconsistency in owner assignment between INDEX and STATISTICS To: Tom Lane Cc: Amit Khandekar , pgsql-hackers@lists.postgresql.org Content-Type: multipart/alternative; boundary="000000000000cef7c1064d19f4e2" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000cef7c1064d19f4e2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you for the additional context, Tom. That makes the design intent much clearer. Cross-table statistics, if realized, would be a significant improvement for join cardinality estimation; looking forward to seeing that develop. Regards, Joshua Shin On Mon, Mar 16, 2026 at 5:09=E2=80=AFAM Tom Lane wrote: > Shin Berg writes: > > Thank you for the detailed feedback, Amit. > > You're right on both points. I had been comparing STATISTICS against > INDEX > > and treating the difference as an inconsistency, but as you point out, > > INDEX ownership is special =E2=80=94 it's tied to the table and intenti= onally not > > user-adjustable. STATISTICS follows the same ownership model as VIEW (t= he > > creator becomes the owner), which is consistent and by design. > > One point that was not mentioned is that while indexes are necessarily > tied to a single table, statistics objects might not always be. The > long-term hope is to allow statistics on cross-table combinations of > columns, which is why the syntax was intentionally set up to look like > SELECT. So, just like views, it's reasonable to give them independent > ownership. > > regards, tom lane > --000000000000cef7c1064d19f4e2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you for the additional context, Tom. That makes the = design intent much clearer.
Cross-table statistics, if realized, would = be a significant improvement for join cardinality estimation; looking forwa= rd to seeing that develop.

Regards,
Joshua Shin

On Mon, Mar 16, 2026 at 5:09=E2=80=AFAM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Shin Berg <sjh910805@gmail.com> writes:
> Thank you for the detailed feedback, Amit.
> You're right on both points. I had been comparing STATISTICS again= st INDEX
> and treating the difference as an inconsistency, but as you point out,=
> INDEX ownership is special =E2=80=94 it's tied to the table and in= tentionally not
> user-adjustable. STATISTICS follows the same ownership model as VIEW (= the
> creator becomes the owner), which is consistent and by design.

One point that was not mentioned is that while indexes are necessarily
tied to a single table, statistics objects might not always be.=C2=A0 The long-term hope is to allow statistics on cross-table combinations of
columns, which is why the syntax was intentionally set up to look like
SELECT.=C2=A0 So, just like views, it's reasonable to give them indepen= dent
ownership.

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 regards, tom lane
--000000000000cef7c1064d19f4e2--