Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

grants для пользователя backup на функции amcheck #175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
triwada opened this issue Feb 22, 2020 · 2 comments
Closed
Labels
Milestone

Comments

@triwada
Copy link

triwada commented Feb 22, 2020

в документации указано, что нужно выдать нужные права

GRANT SELECT ON TABLE pg_catalog.pg_am TO backup;
GRANT SELECT ON TABLE pg_catalog.pg_class TO backup;
GRANT SELECT ON TABLE pg_catalog.pg_database TO backup;
GRANT SELECT ON TABLE pg_catalog.pg_namespace TO backup;
GRANT SELECT ON TABLE pg_catalog.pg_extension TO backup;
GRANT EXECUTE ON FUNCTION bt_index_check(oid) TO backup;
GRANT EXECUTE ON FUNCTION bt_index_check(oid, bool) TO backup;

С функциями расширениями amcheck возникает проблема, т.к. вместо oid нужен тип regclass

postgres=# \dx amcheck
                    Список установленных расширений
   Имя   | Версия | Схема  |                  Описание
---------+--------+--------+--------------------------------------------
 amcheck | 1.1    | public | functions for verifying relation integrity
(1 строка)


postgres=# \sf+ public.bt_index_check(oid,bool)
ERROR:  function "public.bt_index_check(oid,bool)" does not exist
postgres=# \sf+ public.bt_index_check(oid)
ERROR:  function "public.bt_index_check(oid)" does not exist


postgres=# grant EXECUTE on FUNCTION bt_index_check(regclass,boolean) to backup ;
GRANT
postgres=# grant EXECUTE on FUNCTION bt_index_check(regclass) to backup ;
GRANT
@gsmolk
Copy link
Contributor

gsmolk commented Feb 22, 2020

Да, документация врёт и тестов на эти гранты нет.
Поправим, спасибо за фидбэк!

@gsmolk gsmolk added the bug label Feb 22, 2020
@gsmolk gsmolk added this to the 2.3.0 milestone Feb 22, 2020
gsmolk added a commit that referenced this issue Feb 22, 2020
@gsmolk
Copy link
Contributor

gsmolk commented Feb 22, 2020

Исправлено.
Спасибо еще раз!

@gsmolk gsmolk closed this as completed Feb 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants