Hi Anuj Seth,
Thanks for reaching out to Microsoft Q&A.
In azure cosmos db for postgresql (citus), the approach for setting user specific configurations like 'statement_timeout' is different from standard postgresql due to its distributed nature. Azure cosmos db for postgresql might not support the same level of per-role configuration directly through standard sql commands, especially for distributed settings.
Probably workarounds:
- Since direct per-role settings might not be supported, you could handle this at the application level. For example, you can set the 'statement_timeout' parameter for a connection in your application code when a user connects. This can be achieved by setting the timeout in the connection string or in the application logic when creating a connection.
- if you have control over the application or connection management, you can set 'statement_timeout' at the beginning of each session for the specific user. This needs to be done every time the user connects or executes a statement.
Set statement_timeout = '3 min';
- Citus might have its own ways to manage configuration settings or user roles, but they might not support fine-grained configuration like postgresql. Check citus or azure cosmos db documentation for any supported methods or features related to user-specific settings.
- implement a proxy or middleware layer that enforces the timeout for specific users. This layer would need to intercept queries and apply the desired 'statement_timeout' setting.
Directly setting 'statement_timeout' for a specific role might not be supported in azure cosmos db for postgresql as it is in stock postgresql. You may need to implement application-level settings or use alternative approaches like session-level settings or contacting azure support for further assistance.
Please 'Upvote'(Thumbs-up) and 'Accept' as an answer if the reply was helpful. This will benefit other community members who face the same issue.