Menu

#356 ALTER NODE primary node

V1.0 maintenance
open
7
2012-11-30
2012-11-30
No

When Primary datanode fails, failover is successful. When ALTER NODE is issued to reflect new datanode location, it fails as follows:

# ALTER NODE datanode1 WITH (HOST='node07', PORT=20008);
psql:/tmp/cmd.sql:1: ERROR: PGXC node datanode1: two nodes cannot be primary

This statement should succeed because there's no change in primary node, just changing it's location.

Original list of the nodes is as follows:

koichi=# select * from pgxc_node;
node_name | node_type | node_port | node_host | nodeis_primary | nodeis_preferred | node_id
-----------+-----------+-----------+-----------+----------------+------------------+-------------
coord1 | C | 20004 | node06 | f | f | 1885696643
coord2 | C | 20005 | node07 | f | f | -1197102633
coord3 | C | 20004 | node08 | f | f | 1638403545
coord4 | C | 20005 | node09 | f | f | -890157977
datanode1 | D | 20008 | node06 | t | f | 888802358
datanode2 | D | 20009 | node07 | f | f | -905831925
datanode3 | D | 20008 | node08 | f | t | -1894792127
datanode4 | D | 20009 | node09 | f | f | -1307323892
(8 rows)

koichi=#

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.