What we've determined[]
As in Laptop configuration, we've assigned the following:
- Work directory: /home/postgresxc/pgxc/datanode1 and /home/postgresxc/pgxc/datanode2
- Node name: datanode1 and datanode2
- Port number: 20006 and 20007
- GTM port: 20001
The configuration is very similar to GTM configuration. Now configure datanode1 first and datanode2.
You can create the template of coord1 as follows:
$ initdb --nodename=datanode1 -D /home/postgresxc/pgxc/datanode1 $
Please note that we specify the node name here. Then you configure coord1 like:
$ cat >> /home/postgresxc/pgxc/datanode1/postgresql.conf << EOF gtm_port = 20001 port = 20006 EOF $
This time, different from coordinators, you don't need to assing pooler_port.
You should do the similar thing with datanode2.
$ initdb --nodename=datanode2 -D /home/postgresxc/pgxc/datanode2 $ cat >> /home/postgresxc/pgxc/datanode2/postgresql.conf << EOF gtm_port = 20001 port = 20007 EOF $
That's it! You configured all the datanodes.