This patch corrects CREATE NODE GROUP description that it works only
locally.

	modified:   doc-xc/src/sgml/ref/create_nodegroup.sgmlin
This commit fixes the bug 3583921, datanode/coordinator slave crash.

This was caused by incorrect handling of KnownAssignedXids for XC,
where there could be missing Xids in WAL.   Now because XC does not
support consistent database view throught hot standby, KnownAssignedXids
are simply disabled.

Correct handling will be implemented when XC supports consistent
database view through hot standby.

	modified:   src/backend/storage/ipc/procarray.c
This commit improves the description of max_connections value at datanodes.

	modified:   doc-xc/src/sgml/installation.sgmlin
This commit improves gtm_ctl status behavior as described in the
reference manual.  Now for -Z gtm option, gtm_ctl status displays
if it runs as master or slave.

	modified:   src/bin/gtm_ctl/gtm_ctl.c
This is the fix for the bug 3600220 for REL1_0_STABLE, restart after
pg_ctl stop -m immediate.   Added unregistering the node from GTM
before postmaster finishes so that following pg_ctl start succeeds.

	modified:   src/backend/postmaster/postmaster.c
Disable FQS for all the OUTER joins

Patch by Ashutosh, I just did the commit
This is a improved patch to fix the bug 3600220.   Now there's no
additional action with -m immediate.   Coordinator/datanode will
remain registered to GTM.   Instead, when registration fails at
restart, it will try to unregister itself and then retry registration.

	modified:   src/backend/postmaster/postmaster.c
Remove an un-necessary loop while remote update planning.
Also the calls to make_remotequery while DML planning should pass a NIL plan target list.
Add comments on the need and usage of the flag non_fqs_dml in RemoteQueryState
Also correct a check in HandleCommandComplete
Fix for the bug 3553480.   Now gtm_ctl start in a shell script returns
if invoked with -l option.   This behavior is similar to pg_ctl.

	modified:   src/bin/gtm_ctl/gtm_ctl.c
Add support for RETURNING clause in DMLs

The patch does the following major changes

1. Modifies the DML planning code to send the shippable part
   of the returning list to the datanodes in the remote query.
2. Modifies the var references in returning list according to
   the target list that was sent to the datanodes since the
   tuples returned from the datanodes will contain vars in
   that order.
3. Modifies remote query execution to make sure that a single
   response is accepted in case of DMLs on replicated tables
   with returning lists.
4. Manages the fact that a DML can return tuples during remote
   query execution.
5. Manages null tuples received from datanodes while counting
   modified tuples.
6. Uses projection mechanism to show returned tuples
7. Adds test cases.

Special thanks to Ashutosh for reviewing the patch.
The patch allows xc_maintenance_mode to use DML in execute direct and
direct connection to datanodes.

Xc_maintenance_mode can be set to on only by superusers and it cannot
be set to on in postgresql.conf or postgres/pg_ctl command line
parameters.   It can be set only in a session.    This extension
maintains its safetiness and allows (only) DBA to cleanup XC cluster
state without reconfiguration.

	modified:   doc-xc/src/sgml/config.sgmlin
	modified:   src/backend/access/transam/xact.c
	modified:   src/backend/parser/analyze.c
This commit enable gtm_proxy to unregister itself when the registration
failed.   This patch is similar to pg_ctl stop -m immediate improvement
to eliminate DBA intervention when gtm_proxy was killed/crashed and
needs just a restart.

	modified:   src/gtm/proxy/proxy_main.c
Correct documentation of INSERT/UPDATE/DELETE after supporting RETURNING clause
mprove description that XC does not support any constraint which
needs rows at remote nodes to enforce.

	modified:   doc-xc/src/sgml/ddl.sgmlin
	modified:   doc-xc/src/sgml/filelist.sgmlin
	modified:   doc-xc/src/sgml/indices.sgmlin
	modified:   doc-xc/src/sgml/ref/alter_domain.sgmlin
	modified:   doc-xc/src/sgml/ref/create_domain.sgmlin
	modified:   doc-xc/src/sgml/ref/create_table.sgmlin
	new file:   doc-xc/src/sgml/xc-constraint.sgmlin
Improve description of primary and preferred node in CREATE NODE.

	modified:   doc-xc/src/sgml/ref/create_node.sgmlin
Fix for Bug 3601848. Node copy function of RemoteQuery copied remote_param_types
field even when it was NULL in the source node, leading to inconsistent BIND
message being sent to datanode. Corrected the same.
Nikhil Sontakke kindly provided this to fix gtm_ctl dependency
on PATH environment, the bug 3602944.

	modified:   src/bin/gtm_ctl/gtm_ctl.c
	modified:   src/gtm/main/main.c
	modified:   src/gtm/proxy/proxy_main.c
Add convenience macros to get the distribution type from ExecNodes and
RelationLocInfo structures.
While deciding whether a query can be FQSed or not, look at the FROM clause of
the query to find out the datanodes where to ship the query.