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 1tk7Ga-000Be1-9k for pgsql-general@arkaria.postgresql.org; Mon, 17 Feb 2025 19:58:56 +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 1tk7GZ-002THU-0n for pgsql-general@arkaria.postgresql.org; Mon, 17 Feb 2025 19:58:55 +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 1tk7GY-002THM-LC for pgsql-general@lists.postgresql.org; Mon, 17 Feb 2025 19:58:54 +0000 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tk7GW-001Nas-1o for pgsql-general@lists.postgresql.org; Mon, 17 Feb 2025 19:58:53 +0000 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-abb8e405640so246065066b.0 for ; Mon, 17 Feb 2025 11:58:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1739822331; x=1740427131; darn=lists.postgresql.org; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=os6rDTDa62I3Ox0KNntcBKuIawL4jKnQVWUKWwdjzAM=; b=Y7IV00XTHsLduy6JOL+6/oyK5RnE4EUjbwpvDldYipLSYkgq7NJxekQO/nm252DTk+ 6bEcDwr4C3UIJEJxk1mk71m1BNil0hdxiQta4UxTSeVQFR2oXbrlJl9gZl46OP2S/Ifq YhpEG9RDUY0ymK4cQTQwSLHxQFdMg/idf9O2xjpCFnzbUV1t840sv7Joy9urKPcjGiD5 gxbPyl68+fFZUpTYMKJz8aN+XNk8vuC9fKd+o2uDhEhlArhFtGxQ+3LcTXplmYXR8XzA 0MnDTmXlQEa3wCLQiirJZ7XOj8DbpSQ0hBTtWpZGxLFqFuVWE5rQXKQe5bd2CGELO9jB 59XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739822331; x=1740427131; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=os6rDTDa62I3Ox0KNntcBKuIawL4jKnQVWUKWwdjzAM=; b=ryipBDsrbKLUqEAk10w4Sugk+tc9VtLdZEiV/QnITe5B3FGO0CBqZ8IsMqgHqkdKqm IsgO9chBtyIerEMQOPuwxQ1WbJCP8bgrAuSpFFiypTEsWfRGKJCGeE+nVjiuk0NTXc83 ftzFLDQVLbuRv4RzEpL8Cpj/Pa9sSEZ2IuP2hGKxRLoxhBg0bgBakOuOkiOVKJvli7lR aYNCRRiYYObvJ7epiZ6XDpfCLcCFzJMHt1w336A5a+674zfL05OZDoXIXLgwqEggXmcW chGZCH9mJWT9K7pZd0IW9qhovH86Z8lqzUQrKh5dPfB0Ub24erm9ke4KXfqhdtgjNTkp zbiw== X-Forwarded-Encrypted: i=1; AJvYcCWTHC1hGJ/weDtDKt4qmEMcSD+oeoinevKkDMJ4w1TnmBv0tcn8p+UdDdu+lTPJuH7/HBt4POlmS734TkcX@lists.postgresql.org X-Gm-Message-State: AOJu0YwV1nPDvY5UfSviYlf4Tcb51kdSICrZqNr0X2Nh6Un0DR2BgYdZ xJ1u8IpiYr2DivLavqiY8DnxJw33Ec9QTzKtnVfoclktWlO2xyuQkK4k1qPz64bLPMWLx6Eo/p4 ZdyyK5ezL7qiVJ3T8iuwVyYvJ57+J5MLB6ZYreqdrz39XmC5VRXbl1hx+wz8vlu661wG0OT31Qv mt/g== X-Gm-Gg: ASbGnctuf1VM35HIMQmkEPJV5QaSmt1TqIxPRfGvMV0WwiYPHBf8CzOtVagS5zwZEJH Jqqnqw2IpfCvRPyxcsBAmL5yMkhhVmNy094t96dfcWA6YmtR9OeHkVcMrSglUo0pQGDBTbUn+HM Igi0mKbwqQyytpxxdize2FBbGYvkecU0gwTJTW9cQlsCKDfyoIJz2BhTZLITUIbJcMD3Wok4XCK ag0BHhSyKy3bzVl00kK1prVP8y7Zp5V60qz5uoLMCXZbvmm6VLWcENTjbNvhplqhZ3fjz5faxNx vQLeYc774+npQiFJM78wpZypIw21Ye0r7w+v X-Google-Smtp-Source: AGHT+IEx4iwWuKjEkJyIAnBTEIGP2paU0NiSRf6qpbwSx0OvX6qwYpJ2FYVnXLIDVq6ny5zETOqt/A== X-Received: by 2002:a17:907:26ce:b0:ab7:c00c:680f with SMTP id a640c23a62f3a-abb70df4198mr1244395966b.53.1739822330733; Mon, 17 Feb 2025 11:58:50 -0800 (PST) Received: from localhost.localdomain ([2001:871:260:8590:bbaa:b3a2:8283:fbc2]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aba53397f47sm929662066b.127.2025.02.17.11.58.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2025 11:58:50 -0800 (PST) Message-ID: Subject: Re: Clarification on Role Access Rights to Table Indexes From: Laurenz Albe To: Ayush Vatsa , pgsql-general@lists.postgresql.org Date: Mon, 17 Feb 2025 20:58:49 +0100 In-Reply-To: References: User-Agent: Evolution 3.54.3 (3.54.3-1.fc41) MIME-Version: 1.0 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 Mon, 2025-02-17 at 23:31 +0530, Ayush Vatsa wrote: > postgres=3D> SELECT pg_prewarm('pg_class_oid_index'); > ERROR: =C2=A0permission denied for index pg_class_oid_index > postgres=3D> RESET ROLE; > RESET >=20 > postgres=3D# GRANT SELECT ON pg_class_oid_index TO alpha; > ERROR: =C2=A0"pg_class_oid_index" is an index > Based on this, I have=C2=A0few questions: > 1. Can a role have access rights to a table without having access to its = index? > 2. If yes, how can we explicitly grant access to the index? > 3. If no, and the role inherently gets access to the index when granted a= ccess to the table, why > does the pg_prewarm call fail [1] in the above scenario? I have seen a complaint about this bug before: https://dba.stackexchange.com/a/344603/176905 Yours, Laurenz Albe --=20 *E-Mail Disclaimer* Der Inhalt dieser E-Mail ist ausschliesslich fuer den=20 bezeichneten Adressaten bestimmt. Wenn Sie nicht der vorgesehene Adressat= =20 dieser E-Mail oder dessen Vertreter sein sollten, so beachten Sie bitte,=20 dass jede Form der Kenntnisnahme, Veroeffentlichung, Vervielfaeltigung oder= =20 Weitergabe des Inhalts dieser E-Mail unzulaessig ist. Wir bitten Sie, sich= =20 in diesem Fall mit dem Absender der E-Mail in Verbindung zu setzen. *CONFIDENTIALITY NOTICE & DISCLAIMER *This message and any attachment are=20 confidential and may be privileged or otherwise protected from disclosure= =20 and solely for the use of the person(s) or entity to whom it is intended.= =20 If you have received this message in error and are not the intended=20 recipient, please notify the sender immediately and delete this message and= =20 any attachment from your system. If you are not the intended recipient, be= =20 advised that any use of this message is prohibited and may be unlawful, and= =20 you must not copy this message or attachment or disclose the contents to=20 any other person.