# How to avoid admin rights for PostgreSQL access?

**URL:** <https://community.temporal.io/t/how-to-avoid-admin-rights-for-postgresql-access/8013>\
**Category:** Community Support\
**Tags:** postgresql\
**Created:** [April 24, 2023, 5:09am UTC](https://community.temporal.io/t/how-to-avoid-admin-rights-for-postgresql-access/8013 "2023-04-24T05:09:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexey](https://avatars.discourse-cdn.com/v4/letter/a/47e85d/32.png) [@alexey](https://community.temporal.io/u/alexey)\
**Post date:** [April 24, 2023, 5:09am UTC](https://community.temporal.io/t/how-to-avoid-admin-rights-for-postgresql-access/8013/1 "2023-04-24T05:09:44Z")

</div>

Hi,

I launched first time temporal platform on production. While doing this exercise I faced the following difficulty.

In the production environment I have specific user name for temporal which has access only to main db and visibility db. But I was not able to complete setup. After assigning admin role to the temporal user I was able to complete setup.

Question: Is it possible to avoid having admin role for temporal with postgresql?

Thanks

---

<div class="post-metadata">

**Author:** ![tihomir](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/tihomir/32/6580_2.png) [@tihomir](https://community.temporal.io/u/tihomir)\
**Post date:** [April 26, 2023, 11:53pm UTC](https://community.temporal.io/t/how-to-avoid-admin-rights-for-postgresql-access/8013/2 "2023-04-26T23:53:45Z")

</div>

There are two parts, setting up db schemas and then using the tables.

For the first part you would need to be able to set up schemas, would recommend using [schema tools](https://github.com/temporalio/temporal/tree/master/tools). After this is set up Temporal does need to do CRUD operations on created tables, check if that user has permissions to do that.

---

<div class="post-metadata">

**Author:** ![alexey](https://avatars.discourse-cdn.com/v4/letter/a/47e85d/32.png) [@alexey](https://community.temporal.io/u/alexey)\
**Post date:** [May 1, 2023, 1:14am UTC](https://community.temporal.io/t/how-to-avoid-admin-rights-for-postgresql-access/8013/3 "2023-05-01T01:14:06Z")

</div>

Thank you for this clarification. I will try to go deeper from auto-setup container.
