2

What locks does a REVOKE ALL PRIVILEGES ON a PostgreSQL table require?

Specifically, could it get blocked by a long running ALTER TABLE which adds a column to the table?

1 Answer 1

2

REVOKE and GRANT don't take any lock on the table itself, but they modify the table's relacl in pg_class, so they need a NO KEY UPDATE lock on that row.

This will conflict with all other operations that also modify the table metadata, in particular ALTER TABLE.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.