aboutsummaryrefslogtreecommitdiff
path: root/src/include/commands
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2011-12-21 15:17:28 -0500
committerRobert Haas <rhaas@postgresql.org>2011-12-21 15:17:28 -0500
commitcbe24a6dd8fb224b9585f25b882d5ffdb55a0ba5 (patch)
treef0da9150a207733d26be4b99a61cff43fb98a254 /src/include/commands
parentd573e239f03506920938bf0be56c868d9c3416da (diff)
downloadpostgresql-cbe24a6dd8fb224b9585f25b882d5ffdb55a0ba5.tar.gz
postgresql-cbe24a6dd8fb224b9585f25b882d5ffdb55a0ba5.zip
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.
Diffstat (limited to 'src/include/commands')
-rw-r--r--src/include/commands/tablecmds.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/commands/tablecmds.h b/src/include/commands/tablecmds.h
index 20632eb87b9..2a3b4a2e148 100644
--- a/src/include/commands/tablecmds.h
+++ b/src/include/commands/tablecmds.h
@@ -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 */