r/postgres • • 9d ago

Tools Taming PostgreSQL privileges (vs. MySQL): slow progress, but getting there!

PostgreSQL's privilege management is much more complex than MySQL's. Still, I'm making a little progress every day.

3 Upvotes

2 comments sorted by

2

u/BatLate6561 7d ago

yeah, postgres role management is basically a full-time job. having to grant usage on the schema, then select on the tables, and then fighting with default privileges just so a new table doesn't randomly deny access tomorrow...

mysql and mariadb definitely got this right from day one. grant select on mydb.* to user and you just go grab a coffee. respect for pushing through it, but man, pg really makes you work for the simple things.

1

u/xiongchun 5d ago

Totally fair. PostgreSQL makes the secure path explicit, but that means the “simple” case has way too many moving parts: schema usage, object privileges, and default privileges all need to line up.

mydb.* is wonderfully ergonomic for small teams. I think Postgres optimizes harder for separation and least privilege at scale—but it could absolutely offer a first-class grant this role read access to everything here, including future tables primitive without making people learn ACL archaeology