Skip site navigation (1) Skip section navigation (2)

pgsql: Improve behavior of concurrent CLUSTER.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Improve behavior of concurrent CLUSTER.
Date: 2011-12-21 20:22:15
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committers
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.



Modified Files
src/backend/commands/cluster.c   |   16 +++++++---------
src/backend/commands/indexcmds.c |   36 ++----------------------------------
src/backend/commands/tablecmds.c |   35 +++++++++++++++++++++++++++++++++++
src/include/commands/tablecmds.h |    3 +++
4 files changed, 47 insertions(+), 43 deletions(-)

pgsql-committers by date

Next:From: Tom LaneDate: 2011-12-21 23:23:53
Subject: pgsql: Update per-column ACLs, not only per-table ACL,when changing ta
Previous:From: Robert HaasDate: 2011-12-21 14:22:28
Subject: pgsql: Take fewer snapshots.

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group