I'm encountering a tricky issue with my Temporal setup and its connection to PostgreSQL. Temporal is currently set up to connect to a PostgreSQL primary instance using a static hostname format: `host: ..`. This connection works great initially, but when a PostgreSQL replica is promoted to primary due to a failover, the pod name changes, and Temporal can no longer make a connection because it relies on that static hostname. How can I adjust my Temporal configuration to ensure it automatically connects to whichever PostgreSQL instance is currently the primary, even after failovers?
1 Answer
Have you checked how you're installing Temporal? If you're using the Helm chart, there's guidance in the README on GitHub. You might need to update the values to handle failover appropriately, especially if you have a custom PostgreSQL setup. Link to the readme can be found in their documentation.
Yeah, I installed Temporal via Helm, so I'll definitely check that out!