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
- OSUbuntu 26.04 LTS (resolute)
- PostgreSQL18.6-0ubuntu0.26.04.1
- Authscram-sha-256
- TimeAbout 16 min
- Reviewed27 August 2026
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.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| db-a01 | 192.168.0.81 | Ubuntu 26.04 LTS | Primary / Source / Replica Set Member 1 | 2 Core | 4 GB | 50 GB |
Before you start
- The
appdbdatabase with asalesschema.
-
Be refused at the database
-
Grant CONNECT, then be refused at the schema
-
Grant USAGE, then be refused at the table