1. 09 11月, 2020 1 次提交
    • N
      ic-proxy: classify peer addresses · 854c4b84
      Ning Yu 提交于
      The peer addresses are specified with the GUC
      gp_interconnect_proxy_addresses, it can be reloaded on SIGHUP, we used
      to only care about the newly added ones, however it is also possible for
      the user to modify them, or even remove some of them.
      
      So now we add the logic to classify the addresses after parsing the GUC,
      we can tell whether an address is added, removed, or modified.
      
      The handling of the classified addresses will be done in the next
      commit.
      854c4b84
  2. 10 8月, 2020 1 次提交
    • N
      ic-proxy: type checking in ic_proxy_new() · a3ef623d
      Ning Yu 提交于
      A typical mistake on allocating typed memory is as below:
      
          int64 *ptr = malloc(sizeof(int32));
      
      To prevent this, now we make ic_proxy_new() a typed allocator, it always
      return a pointer of the specified type, for example:
      
          int64 *p1 = ic_proxy_new(int64); /* good */
          int64 *p2 = ic_proxy_new(int32); /* bad, gcc will raise a warning */
      Reviewed-by: NHubert Zhang <hzhang@pivotal.io>
      a3ef623d
  3. 29 7月, 2020 1 次提交
    • N
      ic-proxy: include postmaster pid in the domain socket path · 5c5a358a
      Ning Yu 提交于
      We used to store them under /tmp/, we include the postmaster port number
      in the file name in the hope that two clusters will not conflict with
      each other on this file.
      
      However the conflict still happen in the test src/bin/pg_basebackup.
      And it can also happen if a second cluster is missed configured by
      accident.  So to make things safe we also include the postmaster pid in
      the domain socket path, there is no chance for two postmasters to share
      the same pids.
      Reviewed-by: NPaul Guo <pguo@pivotal.io>
      5c5a358a
  4. 23 7月, 2020 1 次提交
  5. 10 7月, 2020 1 次提交
    • N
      ic-proxy: implement the core logic · 6188fb1f
      Ning Yu 提交于
      The interconnect proxy mode, a.k.a. ic-proxy, is a new interconnect
      mode, all the backends communicate via a proxy bgworker, all the
      backends on the same segment share the same proxy bgworker, so every two
      segments only need one network connection between them, which reduces
      the network flows as well the ports.
      
      To enable the proxy mode we need to first configure the guc
      gp_interconnect_proxy_addresses, for example:
      
          gpconfig \
            -c gp_interconnect_proxy_addresses \
            -v "'1:-1:10.0.0.1:2000,2:0:10.0.0.2:2001,3:1:10.0.0.3:2002'" \
            --skipvalidation
      
      Then restart to take effect.
      6188fb1f