]> granicus.if.org Git - postgresql/commit
Improve behavior of concurrent CLUSTER.
authorRobert Haas <rhaas@postgresql.org>
Wed, 21 Dec 2011 20:17:28 +0000 (15:17 -0500)
committerRobert Haas <rhaas@postgresql.org>
Wed, 21 Dec 2011 20:17:28 +0000 (15:17 -0500)
commitcbe24a6dd8fb224b9585f25b882d5ffdb55a0ba5
treef0da9150a207733d26be4b99a61cff43fb98a254
parentd573e239f03506920938bf0be56c868d9c3416da
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.
src/backend/commands/cluster.c
src/backend/commands/indexcmds.c
src/backend/commands/tablecmds.c
src/include/commands/tablecmds.h