When sort operation is delegated to the datanodes by using ORDER BY clause in
the queries being sent, the results from the datanodes need to be merged instead
of sorting from scratch. The number of datanodes participating in the sort can
be large and/or the sorted result needs to have random access. In both the
cases, instead of directly merging from the datanode connections, we store the
sorted runs from the datanodes on tapes at the coordinator. This approach has
lower code footprint and gels well with Postgres code.
If JOIN uses merge strategy and inner and outer trees have only RemoteQuery
nodes, delegate the sorting operation to the datanodes by adding ORDER BY
clause to the queries in inner and outer RemoteQuery nodes.
Support for ROW triggers in Postgres-XC. This includes BEFORE/AFTER/INSTEAD
row triggers. Statement trigger support was already implemented.

There were two independent changes; one to support BEFORE ROW triggers, and the
other to support AFTER ROW triggers. INSTEAD triggers worked w/o any changes.

BEFORE ROW triggers:

When a trigger is to be executed from coordinator, the OLD and NEW row is not
available. It needs to be fetched from the DML source plan.

We have been using the DML source plan slot directly to generate the data for
BINDing the parameter values for UPDATE. Now for BEFORE ROW triggers, the data
of NEW row is the one that is to be BOUND. And this NEW tuple slot
does not have the ctid and node_id junk attribute values. So we need
to generate the BIND data using the data from NEW row and the junk
attributes from the source data.
Similarly there are changes in the way we generate the parameters
markers for the remote UPDATE statement.

AFTER ROW triggers:

AFTER ROW triggers are queued for each of the rows processed, and are then
executed at then end of statement. So we need to store the OLD and NEW rows in
memory until the end of statement or until the end of transaction in case of
deferred constraint triggers. The idea is to use tuplestore for saving them.

TODOs:

New feature tests to be added to regression suite.
COPY with INSERT triggers is not working.
A mix of shippable and non-shippable triggers for the same table has issues. Fix
them.
More unit testing.
Fix a regression test trigger.sql crash discovered on a test environment
machine. Fix involves making sure we access the remote  RETURNING result
slot only for non-local tables.

Follwing scenario caused the crash:
DELETE FROM main_view WHERE a = 31 RETURNING a, b;
where main_view is a view with INSTEAD row trigger.
Fix some typos in documentation
Add steps to remove a node in documentation
Adds more node management feature, still needs test.   For feature fix.

Added "add" and "remove" command.

Documentation will be done by the beta period.