CertGrid CertGrid
Troubleshooting·PostgreSQL

PostgreSQL Database, Schema and Table Privileges

Three separate refusals before a role can read one table: CONNECT on the database, USAGE on the schema, SELECT on the table. Each is a different message, and granting the wrong one leaves you exactly where you started.

Roles and Authentication Guide 19 of 47 Intermediate

Written against the versions above. `PUBLIC` holds CONNECT on every new database by default, which is why the first step revokes it - otherwise the database-level denial cannot be demonstrated.

Every command on this page ran on db-a01.
Server NameIP AddressOSRolesCPURAMHDD
db-a01192.168.0.81Ubuntu 26.04 LTSPrimary / Source / Replica Set Member 12 Core4 GB50 GB

Before you start

  1. Be refused at the database

  2. Grant CONNECT, then be refused at the schema

  3. Grant USAGE, then be refused at the table

Official sources