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 1v6hK4-008KcB-5B for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Oct 2025 03:28:08 +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 1v6hK1-00FEdD-M7 for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Oct 2025 03:28:06 +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 1v6hK1-00FEd0-Am for pgsql-hackers@lists.postgresql.org; Thu, 09 Oct 2025 03:28:06 +0000 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1v6hJz-000mLJ-1v for pgsql-hackers@postgresql.org; Thu, 09 Oct 2025 03:28:05 +0000 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-27eceb38eb1so5117115ad.3 for ; Wed, 08 Oct 2025 20:28:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20230601.gappssmtp.com; s=20230601; t=1759980483; x=1760585283; darn=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=wusjBQbzfzWPAFIsTUAzvAP/5FPtRCWfmwGLEfQmOdQ=; b=LK/3eAk7qjclwEP9xLlJIql9e90UmNrH5E5vOZWhiDXWbfmQWSxyLbaQ0cliVdrLd/ B1hdoVyuYtQstSo5d5sn6VAn8hlYXcYzgclGmg8QZa6LAZ+JVvM/bqUs4mob+B5OfHkO rqjyuXmFncbLG2DtLxFQ5DV9+q26qchukgb+eD/5Nkaay2ZV/2xTBK2FT6S/FSuV/SdS pWJ0Ff+Fkmg9KLKu89MMF1ESHQVmfR08s8iJ4Kgm3Aa3o2bYE+nyQgsN02rDvmidH5lM Bp3nR0AwiCl2Gq8ykVxkZH53Dw7jObyen91pML8Up61iSUeQsileNfAGxOXuqyaj8Ral 4pKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759980483; x=1760585283; 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=wusjBQbzfzWPAFIsTUAzvAP/5FPtRCWfmwGLEfQmOdQ=; b=WYXAPC6seRSeCUOzLM6n6rSVfGCyFMd6FuT17OJKUQBM0tvjUyHWFTJ7Quoe5jyLV8 R/R1E3mJyDaa3vkM+qXVwOCb59j7cePH4kcN24LWr3gViOmKuqwBher4qqhIqpaHussZ YsyV47MopB1ayaeqCBKl17ECLkRrnakhPq/StOTyxpLtVrYFcEgoZJbV9r3vWafXyLh8 VSssgxLlxWudGXLCYOBuy4u96vF8LptFVI2RQ4Cl4EdwxbIqnajxUUOLvTHCDRUZxmUQ CtfwI8cX1wsg6pGfXJG2EJoolB+v3vc3RP/xwY/qbHMX4p/EdoCAZfGKLiP6SIQbOixj xPCQ== X-Forwarded-Encrypted: i=1; AJvYcCUHCtKVtfx+0tn6OjFG9RQOcbcgHZa5LknswhfcjHGTZBXEj2CGOYNhS2h+joo2MYy2vu+dzJYGVp3L8pda@postgresql.org X-Gm-Message-State: AOJu0YyHhmDgWszKyk/Ps78jlGlRrVqErYCif/yKM4CJ/jdi5vhEkVxx YXH8BFpkcuaRsis0T6LUPO8760CXb0btSZCQrDaZV5FfrTEV/zuOj4AKefQMJk8ogw== X-Gm-Gg: ASbGncvM16wqymogl+yERH8FPbEyBqN2Mcfz86JXYgMsOL1p3EFedb/KDqps9d4z9ji xCFXtjaqG3SY1zhuXUuCDnHtoiFu2xv4aSLAb8+7aWTiM2Q8/twYVrBfz5FT2bzcaqKVrXgef4s NL3JCasRyZtCgm9bPbdWdOnirS5dwXH2Ab+Y0B7N5VjiTa+XzlNl31MPFikmD1E5eSieAjz9nN/ diGIQBfCe+7Bz32qODTkRiIuRR8oZXZqG2bGUB6yzYnBfOF70h1GY7gAfcx65BoULbtD4UMGhWJ A1WphJpY5q1FaCEkgZRtCpgg+Z+mFMhP4D6vrKFTfxXBfPC10dW2IRNjDKpfvjuMIS43oEVdPgq wqnAFHnLhfDyF1vqqk7B78DAxix4cY/5+eYL7W4vOYQCQgjo5j/QeiH7pW3z29w0pjnTidrCYHI CCLMU= X-Google-Smtp-Source: AGHT+IFGKtnGq9e7CuwyohIcWTnxUhHMUPH3TptwGLG+vFYEEo3JTauPkzybaZlt+HLhI/hMDmEZbA== X-Received: by 2002:a17:903:1447:b0:248:ff5a:b768 with SMTP id d9443c01a7336-29027356a2cmr66685785ad.10.1759980482610; Wed, 08 Oct 2025 20:28:02 -0700 (PDT) Received: from jeff-ws-bridge.lan (c-24-7-19-3.hsd1.ca.comcast.net. [24.7.19.3]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-29034e20e8esm12467245ad.50.2025.10.08.20.28.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Oct 2025 20:28:02 -0700 (PDT) Message-ID: <7b0e2774cdcc8f522ac82f64a8d7266f353a5094.camel@j-davis.com> Subject: Re: Clarification on Role Access Rights to Table Indexes From: Jeff Davis To: Nathan Bossart , Tom Lane Cc: Ayush Vatsa , Robert Haas , "David G. Johnston" , PostgreSQL Hackers Date: Wed, 08 Oct 2025 20:28:01 -0700 In-Reply-To: <8af53c6e8992aa706e63aafe60a3bcf100b524d1.camel@j-davis.com> References: <149429.1741472260@sss.pgh.pa.us> <279947.1741535285@sss.pgh.pa.us> <3432170.1758730414@sss.pgh.pa.us> <8af53c6e8992aa706e63aafe60a3bcf100b524d1.camel@j-davis.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.3-0ubuntu1 MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2025-10-08 at 20:06 -0700, Jeff Davis wrote: > On Wed, 2025-09-24 at 11:52 -0500, Nathan Bossart wrote: > > On Wed, Sep 24, 2025 at 12:13:34PM -0400, Tom Lane wrote: > > > Nathan Bossart writes: > > > > * RangeVarCallbackForReindexIndex() was checking privileges on > > > > the table > > > > before locking it, so I reversed it in 0002. > > >=20 > > > Don't we do that intentionally, to make sure someone can't cause > > > DOS > > > on a table they have no privileges on? > >=20 > > Ah, right.=C2=A0 I switched it back in v4. >=20 > v4-0001 looks good to me. Actually, now I'm unsure. v4-0001 is taking a lock on the table before checking privileges, whereas v4-0002 is going to some effort to avoid that. Is that because the latter is taking a ShareLock? Regards, Jeff Davis