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 1v7Fwd-00HUsf-LX for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Oct 2025 16:26:15 +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 1v7Fwb-00D9ct-FG for pgsql-hackers@arkaria.postgresql.org; Fri, 10 Oct 2025 16:26:14 +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 1v7Fwa-00D9cl-Uj for pgsql-hackers@lists.postgresql.org; Fri, 10 Oct 2025 16:26:14 +0000 Received: from mail-io1-xd35.google.com ([2607:f8b0:4864:20::d35]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1v7FwZ-001413-1O for pgsql-hackers@postgresql.org; Fri, 10 Oct 2025 16:26:12 +0000 Received: by mail-io1-xd35.google.com with SMTP id ca18e2360f4ac-917be46c59bso233222839f.1 for ; Fri, 10 Oct 2025 09:26:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1760113571; x=1760718371; darn=postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Gfl/X9EbuvoHBEbLOzU6ki6dfiyPqFDJut+Myr9vJLo=; b=QhVN2kNfVqGyQ7Dbp+FYPxQD0HhzosUFVFvYlpQpQNU/e7iR+RvuBqoU9WRHPLiIkA bSp9qWSOeYKl2glZ4TCH2YjPhdYqysW4sr8qAOoK3KeT+o2yzO+b22F8GpKuCj1/6rPN pA3NPg+k1zyAM1ZgCmpgnqcxJZr3VgKxsOeI7mL/ezPxExxae5gjW1//Pq1nLUcq2R06 lflyg15cY0CSLrX65txU5m4RIg8ur41qrh7EVhkP1tZ65NtJULbHkeDdUyAqb/O4ze/P KTXTf4gS8A+3Wkyer6bQP+nbPqoEOFg4K0F/iprnpNaglUdpyc35JsqH1Ig6EmpM3OQA 1dzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760113571; x=1760718371; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Gfl/X9EbuvoHBEbLOzU6ki6dfiyPqFDJut+Myr9vJLo=; b=drZXtq9NQwFzu4W4Gx/eGjmUUJmuZ1FMXFvxSVALrFIHPTaaK+alwcBJEriKHNnXKr Yftdqo5pNPliKssOWtK1TQ/TDt9RB6MHA1AeFS9hGV4kgry4rfK5MfcvdLZ57ogk1JBO U+HdV1DWtLDCcqGDkQIwDcXqtlr5wziwvwqx1PnTK1la+kFD6hLVjykPP75XNkIK7rYn THg0mfguEd6TMKGsk7S90/NAP348ttvH1oQZwB2lHH9DhV7X9nhoXJ0BQkhPu1F3dsuW mLaaFqRh3suvppHLflGV8oyxKrsfrriOvzOybJFv+lAL9X6yhLxI1Z4AB6Vq9DVgBA3Z 1vjA== X-Forwarded-Encrypted: i=1; AJvYcCVbY6q3vqL3WkV04Uimpqy06NXifVDDGDwqiDi/QSFv140toKN2qJLvAj3cOuzlUC4I4faUVj/fmi39+Z2y@postgresql.org X-Gm-Message-State: AOJu0Yx+luOiaefs58Gp+XhwecGjOJiQOXDbbVIvA/8AXR2rQJRis8YL OFbn2kOsG6X3F5OQaaQdN1Sg0LyVOXBeasJdJi5juoz/j5YMP0dpIqhd X-Gm-Gg: ASbGncv4W/Z5ecwaTQmA01xILgkpxmP4UHloqfKUJFKbNUbeb3YFhKDwEN45Ebs9uZS rHXaeaVwDcrKS2UgQdN9iivjWfgET26s74TByDKQZD1qwtAIRMbbt+O0ptk4iuv0GK3hQruX23L eUoLYOmkZrEoiDkLMbPOA9pNxtdYIECfruFaQ9VG9BNmBIfRyuvsMavTCsFFbOtAuQ0ZVAX9nEK GIs8aJjTngxMPk/Z8Cy15hS1ceo/QxEh2UBMY/DBoilr1wH3lcZpnlX4k/h8Jf6HzKQme1dokIY NVlXZ73og2+EXeR87LEEtkYL7M/MhnSXg+XbPnBWkvqOXmnErPk2btVhgw2JPOJsodpOqEsklG9 en8BfivycD0QeXJF28MzJ20Ro+PTAHBzB0hCXFdG3tLVq8wALB6Lyrjip4doMXxOmqh3xKE8RQA 8ASxD+oGtyQx1nOfel644aYYWaRj93Ap6SEEdCS7DW3A== X-Google-Smtp-Source: AGHT+IGT4P3MPMiisJbKOxhwzlJngan8qsaK+kD+6RMAm8lpK9goR0MskSC2NmUwrkOIzY2QXS8MUA== X-Received: by 2002:a05:6e02:1fca:b0:42d:8268:5016 with SMTP id e9e14a558f8ab-42f8741068bmr140040165ab.30.1760113570321; Fri, 10 Oct 2025 09:26:10 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-58f6d9059aasm1013635173.32.2025.10.10.09.26.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Oct 2025 09:26:09 -0700 (PDT) Date: Fri, 10 Oct 2025 11:26:08 -0500 From: Nathan Bossart To: Jeff Davis Cc: Tom Lane , Ayush Vatsa , Robert Haas , "David G. Johnston" , PostgreSQL Hackers Subject: Re: Clarification on Role Access Rights to Table Indexes Message-ID: References: <279947.1741535285@sss.pgh.pa.us> <3432170.1758730414@sss.pgh.pa.us> <8af53c6e8992aa706e63aafe60a3bcf100b524d1.camel@j-davis.com> <7b0e2774cdcc8f522ac82f64a8d7266f353a5094.camel@j-davis.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="fHRxQ/rtkbDAFFP4" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --fHRxQ/rtkbDAFFP4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Oct 09, 2025 at 04:18:03PM -0500, Nathan Bossart wrote: > There's a similar pattern in get_rel_from_relname() in dblink.c, which also > seems to only be used with an AccessShareLock (like pg_prewarm). My best > guess from reading lots of code, commit messages, and old e-mails in the > archives is that the original check-privileges-before-locking work was > never completed. I added an 0004 that changes dblink to use RangeVarGetRelidExtended(). > I'm currently leaning towards continuing with v4 of the patch set. 0001 > and 0003 are a little weird in that a concurrent change could lead to a > "could not find parent table" ERROR, but IIUC that is an extremely remote > possibility. After sleeping on it, I still think this is the right call. In any case, I've spent way too much time on this stuff, so I plan to commit the attached soon. -- nathan --fHRxQ/rtkbDAFFP4 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=v5-0001-fix-priv-checks-in-stats-code.patch