Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling Worker Node Role Changes in Multi-Node Citus/Patorni Setup #7800

Open
curtisraymond opened this issue Dec 21, 2024 · 0 comments
Open

Comments

@curtisraymond
Copy link

I have a multi-node Citus/Patorni deployment in GKE with the following configuration:

  • 1 Coordinator node (1 primary + 1 replica)
  • 2 Worker nodes (each node has 1 primary + 1 replica)

When a Worker node’s primary pod crashes and restarts under a new IP address, I can successfully use citus_update_node() to update the nodename in the pg_dist_node metadata table. However, if the pod’s role changes from Primary to Replica during this event, I see no corresponding function in Citus that allows me to update the noderole from "primary" to "secondary", hasmetadata from "true" to "false", and metadatasynced from "true" to "false".

I am looking for guidance on how to properly update noderole, hasmetadata, and metadatasynced in pg_dist_node if the role of a pod changes for any reason. While I have noticed that citus_set_node_property() can modify certain pg_dist_node properties, it appears it can currently only change the shouldhaveshards property.

Question: What is the recommended way to update noderole, hasmetadata, and metadatasynced in pg_dist_node to reflect role changes for a Worker node?

Thank you for your assistance!

pg_dist_node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant