ALTER NODE nodename WITH ( [ TYPE = nodetype,] [ HOST = hostname,] [ PORT = portnum,] [ PRIMARY,] [ PREFERRED ] )
Note: The following description applies only to Postgres-XC
ALTER NODE is new SQL query specific to Postgres-XC since 0.9.7 that modifies cluster node information in catalog pgxc_node.
Node connection that has been modified does not guarranty that connection information cached in pooler is updated accordingly.
ALTER NODE only runs on the local node where it is launched.
The name of the selected cluster node.
The type of the cluster node. It is possible to specify a Coordinator node or a Datanode node.
Defines if the cluster node is used as a primary for replicated write operations.
Defines if the cluster node is used as a preferely for replicated read operations.
The node type for given cluster node. Possible values are: 'coordinator' for a Coordinator node and 'datanode' for a Datanode node.
The hostname or IP used to connect to the cluster node.
The port number used to connect to the cluster node.
A Datanode can be modified as PRIMARY and as PREFERRED as many times as necessary.
A node type cannot be modified.
Modify a Coordinator node located on local machine to use port 6543.
ALTER NODE coord_node WITH (PORT = 6543, HOST = 'localhost');