Re: fix and document CLUSTER privileges
От | Gilles Darold |
---|---|
Тема | Re: fix and document CLUSTER privileges |
Дата | |
Msg-id | 79ea98ff-3bd7-03ff-be40-70e851c38640@migops.com обсуждение исходный текст |
Ответ на | Re: fix and document CLUSTER privileges (Nathan Bossart <nathandbossart@gmail.com>) |
Ответы |
Re: fix and document CLUSTER privileges
|
Список | pgsql-hackers |
Here is a new version of the patch. I've moved the privilege checks to a new function, and I added a note in the docs about clustering partitioned tables in a transaction block (it's not allowed).
Getting into review of this patch I wonder why the CLUSTER command do not react as VACUUM FULL command when there is insuffisant privileges. For example with a partitioned table (ptnowner) and two partitions (ptnowner1 and ptnowner2) with the second partition owned by another user, let' say usr2. We have the following report when executing vacuum as usr2:
testdb=> VACUUM FULL ptnowner;
WARNING: permission denied to vacuum "ptnowner", skipping it
WARNING: permission denied to vacuum "ptnowner1", skipping it
VACUUM
Here only ptnowner2 have been vacuumed which is correct and expected.
For the cluster command:
testdb=> CLUSTER;
CLUSTER
I would have expected something like:
testdb=> CLUSTER;
WARNING: permission denied to cluster "ptnowner1", skipping it
CLUSTER
I mean that the silent behavior is not very helpful.
This is the current behavior of the CLUSTER command and current patch adds a sentence about the silent behavior in the documentation. This is good but I just want to ask if we could want to fix this behavior too or just keep things like that with the lack of noise.
Best regards,
-- Gilles Darold
В списке pgsql-hackers по дате отправления: