1

I have a cluster like that node1(gtm), node2(gtm-slave), node3(gtm-proxy1, coord1, datanode1)I setup those nodes using pgxc_ctl. I am testing the gtm failover. Here is what I did:

  1. copy pgxc_ctl.conf from node1 to node2
  2. shutdown node1
  3. ssh int node2 and type pgxc_ctl, then type failover gtm
  4. ssh into node3, and type gtm_ctl reconnect -Z gtm_proxy -D proxydir -o "-s node2 -t 20001"
  5. try psql it give me error "FATAL: Could not obtain a transaction ID from GTM. The GTM might have failed or lost connectivity"

so I type "stop all" and "init all", looks like it fixed the issue. But I don't think I should need to restart the cluster. Anyone have a suggestions

Tony Huang
  • 163
  • 3
  • 13

1 Answers1

1

ok, I found out why. After adding the first datanode, need to stop all and init all. If I don't do that, the postgres will connect to the gtm server instead of the gtm-proxy.

Tony Huang
  • 163
  • 3
  • 13
  • Warning: 'init all' will initialize your cluster -- It works for test clusters, but for a live cluster it will wipe out your data. Don't do it. You may need to change the reference on your postgresql.conf to have the correct port and ip of the new GTM. But dont run 'init all' on a running cluster. – DMin Sep 24 '19 at 09:00