ALTER NODE nodename WITH ( [ TYPE = nodetype,] [ HOST = hostname,] [ PORT = portnum,] [ PRIMARY [ = boolean],] [ PREFERRED [ = boolean ] ] )
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 guaranty 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 node for replicated write operations. A boolean value can be specified. In case no value is specified, PRIMARY acts like true.
Defines if the cluster node is used as a preferred node for replicated read operations. A boolean value can be specified. In case no value is specified, PREFERRED acts like true.
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');