You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pgcolumnar.truncate() takes its lock and names the relation type before checking ownership (the #749 pattern) #1384
pgcolumnar_truncate (src/columnar_vacuum.c, around line 2917 on main 9b3c181) does three things in this order:
table_open(relid, ShareUpdateExclusiveLock);
refuses a non-columnar relation with "relation … is not a columnar table";
PgColumnarRequireTableOwner(rel).
This is the order #749 fixed in the five maintenance entry points. It has two consequences:
A non-owner queues for the lock. If the owner holds a conflicting lock, the non-owner waits behind it, and so does every later request.
A non-owner learns the relation type of a table they have no rights on.
Reproduced (by the #1381 review): a probe in a copy of vacuum_lock_privilege.sh gave FAIL REVIEW PROBE truncate refuses a non-owner before its lock: got [locktimeout] want [owner]
Activity
fix: pgcolumnar.truncate() checks ownership before its lock and its t…
fix: pgcolumnar.truncate() checks ownership before its lock and its t…
fix: pgcolumnar.truncate() checks ownership before its lock and its t…
fix: pgcolumnar.truncate() checks ownership before its lock and its t…
Merge pull request #1401 from commandprompt/fix/1384-truncate-owner-f…