summaryrefslogtreecommitdiff
path: root/src/include/utils
diff options
context:
space:
mode:
authorMichael P2010-10-13 01:45:16 +0000
committerPavan Deolasee2011-05-19 16:45:18 +0000
commit1a9cb6f13394e9f5e8648f1cb24fac211956b3ce (patch)
tree7dc7d3f81b75618160bc6888d4854b404c563c06 /src/include/utils
parent9b94deb70ede6c7860b471e223e125b873289922 (diff)
Added support for two new pieces of functionality.
1) Support for DDL and utility command synchronisation among Coordinators. DDL is now synchronized amongst multiple coordinators. Previously, after DDL it was required to use an extra utility to resync the nodes and restart other Coordinators. This is no longer necessary. DDL support works also with common BEGIN, COMMIT and ROLLBACK instructions in the cluster. DDL may be initiated at any node. Each Coordinator can connect to any other one. Just as Coordinators use pools for connecting to Data Nodes, Coordinators now use pools for connecting to the other Coordinators. 2) Support for PREPARE TRANSACTION and COMMIT TRANSACTION, ROLLBACK PREPARED. When a transaction is prepared or committed, based on the SQL, it will only execute on the involved nodes, including DDL on Coordinators. GTM is used track which xid and nodes are involved in the transaction, identified by the user or application specified transaction identifier, when it is prepared. New GUCs -------- There are some new GUCs for handling Coordinator communication num_coordinators coordinator_hosts coordinator_ports coordinator_users coordinator_passwords In addition, a new GUC replaces coordinator_id: pgxc_node_id Open Issues ----------- Implicit two phase commit (client in autocommit mode, but distributed transaction required because of multiple nodes) does not first prepare on the originating coordinator before committing, if DDL is involved. We really should prepare here before committing on all nodes. We also need to add a bit of special handling for COMMIT PREPARED. If there is an error, and it got committed on some nodes, we still should force it to be committed on the originating coordinator, if involved, and still return an error of some sort that it was partially committed. (When the downed node recovers, in the future it will determine if any other node has committed the transaction, and if so, it, too, must commit.) It is a pretty rare case, but we should handle it. With this current configuration, DDL will fail if at least one Coordinator is down. In the future, we will make this more flexible. Written by Michael Paquier
Diffstat (limited to 'src/include/utils')
-rw-r--r--src/include/utils/guc_tables.h3
-rw-r--r--src/include/utils/timestamp.h4
2 files changed, 2 insertions, 5 deletions
diff --git a/src/include/utils/guc_tables.h b/src/include/utils/guc_tables.h
index 9c87386288..b69dd3d6b3 100644
--- a/src/include/utils/guc_tables.h
+++ b/src/include/utils/guc_tables.h
@@ -78,7 +78,8 @@ enum config_group
CUSTOM_OPTIONS,
DEVELOPER_OPTIONS,
DATA_NODES,
- GTM
+ GTM,
+ COORDINATORS
};
/*
diff --git a/src/include/utils/timestamp.h b/src/include/utils/timestamp.h
index 7c8e744915..31d110ad27 100644
--- a/src/include/utils/timestamp.h
+++ b/src/include/utils/timestamp.h
@@ -23,10 +23,6 @@
#include "utils/int8.h"
#endif
-#ifdef PGXC
-#include "pgxc/pgxc.h"
-#endif
-
/*
* Timestamp represents absolute time.
*