0

I have setup clickhouse server, I have dont following things.

  1. Under default user in users.xml have enabled these settings.
    <access_management>1</access_management>
    <named_collection_control>1</named_collection_control>
    <show_named_collections>1</show_named_collections>
    <show_named_collections_secrets>1</show_named_collections_secrets>
    
  2. Now since default user have access management settings enabled, I logged in with default user and created an admin user, admin, using
    CREATE USER admin IDENTIFIED BY '<password>';
    GRANT ALL ON *.* TO admin WITH GRANT OPTION;
    
  3. I restarted the server and logged in with this admin user and enabled Async insert settings.
    ALTER USER admin SETTINGS async_insert = 1;
    
    This gave a success query execution response. Ok

After step 3 if I check select * from system.settings where name ilike '%async%'; It is showing async_insert is still disabled and has not been changed. Why is that? What am I doing wrong here?

  • did you try exit from clickhouse-client after step 3? try to use `CREATE SETTINGS PROFILE` https://clickhouse.com/docs/en/sql-reference/statements/create/settings-profile and assign it RBAC `admin` user – Slach Aug 09 '23 at 04:59
  • I tried this for async_insert using `CREATE SETTINGS PROFILE async_insert_profile SETTINGS async_insert = 1 TO admin`, this actually worked, BUT, when I did it again for altering wait_for_async_insert settings value, it didn't apply query gave a success response but `select * from system.settings ` is still showing the old value. – Shikhar Tyagi Aug 09 '23 at 06:42
  • Do you know why is this not working with `ALTER USER admin SETTINGS = ;`? – Shikhar Tyagi Aug 09 '23 at 06:43
  • settings profile applied once time during authorization, you need to logout, login, to apply changes to your current settings profile – Slach Aug 09 '23 at 07:14
  • Yeah got it, thanks. – Shikhar Tyagi Aug 09 '23 at 07:37

0 Answers0