# Question about pg\_tde use HashiCorp Vault to achieve rotate key

**URL:** <https://forums.percona.com/t/question-about-pg-tde-use-hashicorp-vault-to-achieve-rotate-key/37827>\
**Category:** PG\_TDE – Transparent Data Encryption (TDE)\
**Created:** [May 5, 2025, 8:22am UTC](https://forums.percona.com/t/question-about-pg-tde-use-hashicorp-vault-to-achieve-rotate-key/37827 "2025-05-05T08:22:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevin310007](https://avatars.discourse-cdn.com/v4/letter/k/ee7513/32.png) [@kevin310007](https://forums.percona.com/u/kevin310007)\
**Post date:** [May 5, 2025, 8:22am UTC](https://forums.percona.com/t/question-about-pg-tde-use-hashicorp-vault-to-achieve-rotate-key/37827/1 "2025-05-05T08:22:26Z")

</div>

Hi, I’m trying to use pg\_tde and HashiCorp Vault to achieve rotate key.  
Here are my steps below:

1. I start the HashiCorp Vault:  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/3X/5/9/59b16eb00487c30bdf6b9c2ca90cb789b2ce3918.png)

 ![image](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/3X/7/c/7c76655cf69491e166c78b297e5654033545e0d4.png)

1. Set the environment variable  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/3X/1/b/1bd62deea839dd5cd33061cd318c9b471a0ef114.png)

2. Check the vault service is running ok.  

3. Store two keys  

4. Valid the keys  

5. Set the pg\_tde\_policy.hcl  

6. Write in and read the pg\_tde\_policy  

8.Create a new token relate to the pg\_tde\_policy

 ![image](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/3X/b/2/b22be7cf1b2eb448231efc5e85d596bc7ca8ad6f.png)

1. Valid the new token  

2. Connect to database and check the status  

3. Create a new provider through HashiCorp Vault and set the principal key  

4. Restart the percona postgrsql service  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/3X/c/8/c805dcbdc8f3c9f0dd518cfee9e784f94deb4b8f.png)

5. When I try to connect database again, it seems core dumped…  

Any suggestions for my problem?

Thx!

---

<div class="post-metadata">

**Author:** ![Robert\_Bernier](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/robert_bernier/32/1367_2.png) [@Robert\_Bernier](https://forums.percona.com/u/Robert_Bernier)\
**Post date:** [May 5, 2025, 2:35pm UTC](https://forums.percona.com/t/question-about-pg-tde-use-hashicorp-vault-to-achieve-rotate-key/37827/2 "2025-05-05T14:35:51Z")

</div>

Hi,

I’ve notified our pg\_tde developers to get back to you on this issue!

---

<div class="post-metadata">

**Author:** ![Dragos\_Andriciuc](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/dragos_andriciuc/32/20787_2.png) [@Dragos\_Andriciuc](https://forums.percona.com/u/Dragos_Andriciuc)\
**Post date:** [May 8, 2025, 4:00pm UTC](https://forums.percona.com/t/question-about-pg-tde-use-hashicorp-vault-to-achieve-rotate-key/37827/3 "2025-05-08T16:00:20Z")

</div>

Hello Kevin,

We have recently updated our documentation site here: [pg\_tde documentation](https://docs.percona.com/pg-tde/index.html)

Please let us know your thoughts, and if you have the time to go through the setup again, let us know your feedback, we really appreciate it, thank you!
