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 1vzxkX-001U5D-2y for pgsql-hackers@arkaria.postgresql.org; Tue, 10 Mar 2026 14:07:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vzxkW-003eYY-0e for pgsql-hackers@arkaria.postgresql.org; Tue, 10 Mar 2026 14:07:52 +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 1vzxkV-003eYO-2t for pgsql-hackers@lists.postgresql.org; Tue, 10 Mar 2026 14:07:52 +0000 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vzxkT-00000001yhb-3Zv3 for pgsql-hackers@lists.postgresql.org; Tue, 10 Mar 2026 14:07:52 +0000 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-662b933f8d1so2135449a12.2 for ; Tue, 10 Mar 2026 07:07:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1773151669; cv=none; d=google.com; s=arc-20240605; b=YVdbaX56bvFjijGtqHCCjcOdzpMQKoka2xAq50wKSWqoT9AReaW2GYP1Ig6grl0XLu 1LYaQ1SIg24cJi4xC7xQRydrqykrNK4pY1tm0Ls1/saIDrm4nvpvuzjnPFpfseu+LOZ6 q7I5dfevwuhHvUQIsM/4cZ4n10hioWxdFzfPRz955VmUaRvGhVQUDPyydSolA/fO7W66 VQPsqMQKaQhPK5zL4jer7OJCzxKqw89TShVTr50ncqD67epCpGBsKk3iw9TlcueZ7SC4 lKVklqI9B4+KY1I6P6LsmX9plp3E5nJdZi99yDCXmtpiWSDR/XR7s27Zc1Br9tT1r7hJ Tl/Q== 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=fkvgFrnKycFyDoNuIeeSlG6QiehQMGCGYg4p+2YjguI=; fh=Yo1pTuu9z5wnUgCJYm8KgyXxyOabXWL9nTCf1qbTEoo=; b=FoemmqRyzo9kTdZa1DjQkguGGtDVfspR063hTjelGsDIgVQqybi9lUXcOtSZ9DUvtI Ri95MTxbftSUN5eRyMqHGx2NInZnhVEPEBocDG/2QHusYHbQ5KWi1U/GximEmb4ZZnzD 0+IHPbw9cOEQtvxdVYmwe8OVoiYjeNqCj4XH7I7I7MMxIXygn8ita6pOZyF/t/wJ+ECc fDTumVrq56f3smE1KyJeT6yO1Jf+AgwsvOh8mLJ8OsBh+yaEnv8lXTt6hY0NnDKffVWy xbriqHuBNUJKItS4Yr5tDHB0+V6awbsQqPEU9lytLOTLKA+HOt94zwTTC/HVJReBWCpm 9NQw==; 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=1773151669; x=1773756469; 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=fkvgFrnKycFyDoNuIeeSlG6QiehQMGCGYg4p+2YjguI=; b=kwBp+v175qtZ7PefEbXUbtssjX0FwFN9g5du2zp1ZQ7BRBMPVuhbjgt4W8168E8OIP CsFlMRt3f6bxqNAVjkGBJ6v8qxlb3pRg6/ZkYShBO6gIvgpxgCTNLYJfz9EPSFmAFPf1 K2dwFNZgh7fyDv1G/bnz7KKjDieeFgkKvkv1kd5aGSHkrSr/GIujGKpY4b6TaWRI/W3H gDRmHFGJ+DSzBlPv5qp0a5HaMk6ys63sLJWaHcVKupP6vDRu5mzt1u0/QQzj3IXIYxqN c2fmR6gxtj+7eh0MiUdDc6fSmYm3PTNnuUuDbIvKrFMmEVBrGQdWBHT2ytYZ1VEMPLqN iGOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773151669; x=1773756469; 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=fkvgFrnKycFyDoNuIeeSlG6QiehQMGCGYg4p+2YjguI=; b=qqIGxBIKENSYE7uAlovS8LxQE7BTAD4IOIrmkviN1gLS6xHYug6HUOJrW1SzwGLqwD ad64md+iX5cgkR2yrrpENyn/6FVw4pbRzKUJz1y9UqkKiBfEb3dZyLCu2gtR6XTsEDij 1M+pXlACh3lY7/trLnSjPyfNI2s6jJ1s5UKoDWb/ycgQBVF79a62kznbxbheujzkYAHw 5CskjSH+wN9KvM6l9mUjLjm5GRufHvcj0W1U5jcocflpavOQCWjnQMxMKY60XhyjFAZP VoaSpIj+YCuEPtahrWlcJgIte/vUq4zkVxrx3Z8XVEE+ZynGxXcDjHG6HI+A8DavH6Dq dIaQ== X-Gm-Message-State: AOJu0YxPxjj+SNZM3t3UfgM1aGJEKsEJp1ZU8NSP/eZndAcJ82b+DR4k MUNuclshFUdvTp69rGUJ8fYrL9pDk788GUOkWoo7CKZwYfoG2mt0487141cTcUy4Kw3cRp6j/Mo 8TLls3NpStOTTweTRVgt9Yycp/ZXS02P4jidl X-Gm-Gg: ATEYQzxqLiB52dEYtV3ua5MetYk5/oA6wM1IPdlvbM+BkG8lYxCepKlAHOe2DZVDeYG ljSNDgf3lya3Ojnk1agXs7rnuXdZW7M6Bv/XlVAMsvJMpLP3x+z535h/VhzNRZqMa93hfZ4QseT a5KbknjK8Xnhvw+vGzVXObfNx576bEtCBI8MKmxH3gVI/rCozvM2uNkeZQAEDVyEPqoOgIE1inJ 6RGMaSMEyOEur89+elplCOoecRcg8sHlPBP5Ree3uOVWgBNqpe3WdOJH39+liMVWcu56M4UnTMh h0XOiYudFR2IRiaLza9A7CRVVlRnIj/lqdK1gpZf X-Received: by 2002:a05:6402:5112:b0:65f:fd46:3fad with SMTP id 4fb4d7f45d1cf-6619d53ce59mr7494387a12.31.1773151668274; Tue, 10 Mar 2026 07:07:48 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Amit Khandekar Date: Tue, 10 Mar 2026 19:37:10 +0530 X-Gm-Features: AaiRm53OCjVosNYvuM-067SURSO5TIbol5HFlpuPwn5GiyX4NoPcdG4NGLPuEgk Message-ID: Subject: Re: Inconsistency in owner assignment between INDEX and STATISTICS To: Shin Berg Cc: pgsql-hackers@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 On Sat, 14 Feb 2026 at 14:18, Shin Berg wrote: > > Hi, > > I'd like to raise a small consistency issue between how INDEX and extende= d STATISTICS handle object ownership, and ask whether aligning them would b= e desirable. > > Current behavior (tested on REL_17_STABLE): > > - When a superuser creates an INDEX on another user's table, the index is= owned by the *table owner* (see catalog/index.c: index relation's relowner= is set from the heap relation's relowner). > - When a superuser creates STATISTICS on another user's table, the statis= tics object is owned by the *current user* (statscmds.c: stxowner =3D GetUs= erId()). I will try to divide the problem into two questions: 1. Should the statistics object's owner be permanently associated with the table owner?