mirror of
https://github.com/postgres/postgres.git
synced 2025-10-25 13:17:41 +03:00
Improve behavior of concurrent CLUSTER.
In the previous coding, a user could queue up for an AccessExclusiveLock on a table they did not have permission to cluster, thus potentially interfering with access by authorized users who got stuck waiting behind the AccessExclusiveLock. This approach avoids that. cluster() has the same permissions-checking requirements as REINDEX TABLE, so this commit moves the now-shared callback to tablecmds.c and renames it, per discussion with Noah Misch.
This commit is contained in:
@@ -71,4 +71,7 @@ extern void AtEOSubXact_on_commit_actions(bool isCommit,
|
||||
SubTransactionId mySubid,
|
||||
SubTransactionId parentSubid);
|
||||
|
||||
extern void RangeVarCallbackOwnsTable(const RangeVar *relation,
|
||||
Oid relId, Oid oldRelId, void *arg);
|
||||
|
||||
#endif /* TABLECMDS_H */
|
||||
|
||||
Reference in New Issue
Block a user