Marcelo Fernandes <[email protected]> writes:
> But from a roles/privilege framework perspective, why would you want to give
> certain users the DELETE privilege whereas others you want to give them
> only the TRUNCATE privilege?
> Are we saying to a user that "You need a different level of privilege because
> you are about to cause a MVCC-unsafe operation?".

Personally I think that's a plenty good enough reason ;-).
The very different locking level is another good reason.
TRUNCATE will block all other activity on the table, while
DELETE doesn't.

However, looking at our git history, it appears that TRUNCATE was
originally only permitted to the table owner.  The separate permission
bit was added (years later) so that the owner could grant out the
ability to others, without doing anything as non-backwards-compatible
as reinterpreting what operations a DELETE grant allows.

                        regards, tom lane


Reply via email to