git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: ff23b59) | patch
Fix MAINTAIN privileges for toast tables and partitions.
2023年1月13日 23:32:37 +0000 (15:32 -0800)
2023年1月14日 08:16:23 +0000 (00:16 -0800)
commit ff9618e82a466fc9c635f9f087776e57b21e4f14
Fix MAINTAIN privileges for toast tables and partitions.

Commit 60684dd8 left loose ends when it came to maintaining toast
tables or partitions.

For toast tables, simply skip the privilege check if the toast table
is an indirect target of the maintenance command, because the main
table privileges have already been checked.

For partitions, allow the maintenance command if the user has the
MAINTAIN privilege on the partition or any parent.

Also make CLUSTER emit "skipping" messages when the user doesn't have
privileges, similar to VACUUM.

Author: Nathan Bossart
Reported-by: Pavel Luzanov
Reviewed-by: Pavel Luzanov, Ted Yu
Discussion: https://postgr.es/m/20230113231339.GA2422750@nathanxps13
16 files changed:
doc/src/sgml/ref/analyze.sgml diff | blob | blame | history
doc/src/sgml/ref/cluster.sgml diff | blob | blame | history
doc/src/sgml/ref/lock.sgml diff | blob | blame | history
doc/src/sgml/ref/reindex.sgml diff | blob | blame | history
doc/src/sgml/ref/vacuum.sgml diff | blob | blame | history
src/backend/commands/cluster.c diff | blob | blame | history
src/backend/commands/indexcmds.c diff | blob | blame | history
src/backend/commands/lockcmds.c diff | blob | blame | history
src/backend/commands/tablecmds.c diff | blob | blame | history
src/backend/commands/vacuum.c diff | blob | blame | history
src/include/commands/tablecmds.h diff | blob | blame | history
src/test/isolation/expected/cluster-conflict-partition.out diff | blob | blame | history
src/test/isolation/specs/cluster-conflict-partition.spec diff | blob | blame | history
src/test/regress/expected/cluster.out diff | blob | blame | history
src/test/regress/expected/vacuum.out diff | blob | blame | history
src/test/regress/sql/cluster.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /