summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorKoichi Suzuki2012-01-12 01:44:21 +0000
committerKoichi Suzuki2012-01-12 01:44:21 +0000
commit7f6c2f920521c213bbf9624fc445980f258e9a08 (patch)
tree3e9be123a35e38b2819eb8d48ef8b41b949ea1f5 /src/include
parent52d80a9ee69b94e7be5850a449b5ff9c041eea67 (diff)
This commit improves major feature of GTM/GTM-Proxy, including
1) Correction of transaction bacukp to GTM-Standby. Now it backs up transaction handle and GXID, not proxy message from client. 2) Backup is written before response is flushed to the client. 3) Backup is optimizes so that no response will be written back from the standby if not needed. 4) Backup can be done synchronously or asynchronously. In synchronous backup, each message flush to the client will be associated with synchronization of the message to the standby. Also, one bug fix is included to make tcp_keepalives work to monitor the client connection. Server connection monitoring will be included in later patches.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gtm/gtm_client.h59
-rw-r--r--src/include/gtm/gtm_msg.h73
-rw-r--r--src/include/gtm/gtm_opt.h1
-rw-r--r--src/include/gtm/gtm_seq.h14
-rw-r--r--src/include/gtm/gtm_txn.h31
-rw-r--r--src/include/gtm/gtm_utils.h5
-rw-r--r--src/include/gtm/register.h4
7 files changed, 143 insertions, 44 deletions
diff --git a/src/include/gtm/gtm_client.h b/src/include/gtm/gtm_client.h
index 971277816e..f619b37acc 100644
--- a/src/include/gtm/gtm_client.h
+++ b/src/include/gtm/gtm_client.h
@@ -166,13 +166,26 @@ size_t get_sequence_list(GTM_Conn *, GTM_SeqInfo **, size_t);
* Transaction Management API
*/
GlobalTransactionId begin_transaction(GTM_Conn *conn, GTM_IsolationLevel isolevel, GTM_Timestamp *timestamp);
+int bkup_begin_transaction(GTM_Conn *conn, GTM_TransactionHandle txn, GTM_IsolationLevel isolevel,
+ bool read_only, GTM_Timestamp timestamp);
+int bkup_begin_transaction_gxid(GTM_Conn *conn, GTM_TransactionHandle txn, GlobalTransactionId gxid,
+ GTM_IsolationLevel isolevel, bool read_only, GTM_Timestamp timestamp);
+
GlobalTransactionId begin_transaction_autovacuum(GTM_Conn *conn, GTM_IsolationLevel isolevel);
+int bkup_begin_transaction_autovacuum(GTM_Conn *conn, GTM_TransactionHandle txn, GlobalTransactionId gxid,
+ GTM_IsolationLevel isolevel);
int commit_transaction(GTM_Conn *conn, GlobalTransactionId gxid);
+int bkup_commit_transaction(GTM_Conn *conn, GlobalTransactionId gxid);
int commit_prepared_transaction(GTM_Conn *conn, GlobalTransactionId gxid, GlobalTransactionId prepared_gxid);
+int bkup_commit_prepared_transaction(GTM_Conn *conn, GlobalTransactionId gxid, GlobalTransactionId prepared_gxid);
int abort_transaction(GTM_Conn *conn, GlobalTransactionId gxid);
+int bkup_abort_transaction(GTM_Conn *conn, GlobalTransactionId gxid);
int start_prepared_transaction(GTM_Conn *conn, GlobalTransactionId gxid, char *gid,
char *nodestring);
+int backup_start_prepared_transaction(GTM_Conn *conn, GTM_TransactionHandle txn, char *gid,
+ char *nodestring);
int prepare_transaction(GTM_Conn *conn, GlobalTransactionId gxid);
+int bkup_prepare_transaction(GTM_Conn *conn, GlobalTransactionId gxid);
int get_gid_data(GTM_Conn *conn, GTM_IsolationLevel isolevel, char *gid,
GlobalTransactionId *gxid, GlobalTransactionId *prepared_gxid,
char **nodestring);
@@ -185,12 +198,20 @@ begin_transaction_multi(GTM_Conn *conn, int txn_count, GTM_IsolationLevel *txn_i
bool *txn_read_only, GTMProxy_ConnID *txn_connid,
int *txn_count_out, GlobalTransactionId *gxid_out, GTM_Timestamp *ts_out);
int
+bkup_begin_transaction_multi(GTM_Conn *conn, int txn_count,
+ GTM_TransactionHandle *txn, GlobalTransactionId start_gxid, GTM_IsolationLevel *isolevel,
+ bool *read_only, GTMProxy_ConnID *txn_connid);
+int
commit_transaction_multi(GTM_Conn *conn, int txn_count, GlobalTransactionId *gxid,
- int *txn_count_out, int *status_out);
+ int *txn_count_out, int *status_out);
+int
+bkup_commit_transaction_multi(GTM_Conn *conn, int txn_count, GTM_TransactionHandle *txn);
int
abort_transaction_multi(GTM_Conn *conn, int txn_count, GlobalTransactionId *gxid,
int *txn_count_out, int *status_out);
int
+bkup_abort_transaction_multi(GTM_Conn *conn, int txn_count, GlobalTransactionId *gxid);
+int
snapshot_get_multi(GTM_Conn *conn, int txn_count, GlobalTransactionId *gxid,
int *txn_count_out, int *status_out,
GlobalTransactionId *xmin_out, GlobalTransactionId *xmax_out,
@@ -206,14 +227,24 @@ GTM_SnapshotData *get_snapshot(GTM_Conn *conn, GlobalTransactionId gxid,
* Node Registering management API
*/
int node_register(GTM_Conn *conn,
- GTM_PGXCNodeType type,
- GTM_PGXCNodePort port,
- char *node_name,
- char *datafolder);
-int node_register_internal(GTM_Conn *conn, GTM_PGXCNodeType type, const char *host,
- GTM_PGXCNodePort port, char *node_name, char *datafolder,
- GTM_PGXCNodeStatus status);
+ GTM_PGXCNodeType type,
+ GTM_PGXCNodePort port,
+ char *node_name,
+ char *datafolder);
+int bkup_node_register(GTM_Conn *conn,
+ GTM_PGXCNodeType type,
+ GTM_PGXCNodePort port,
+ char *node_name,
+ char *datafolder);
+int node_register(GTM_Conn *conn, GTM_PGXCNodeType type, GTM_PGXCNodePort port, char *node_name, char *datafolder);
+int node_register_internal(GTM_Conn *conn, GTM_PGXCNodeType type, const char *host, GTM_PGXCNodePort port, char *node_name,
+ char *datafolder, GTM_PGXCNodeStatus status);
+int bkup_node_register(GTM_Conn *conn, GTM_PGXCNodeType type, GTM_PGXCNodePort port, char *node_name, char *datafolder);
+int bkup_node_register_internal(GTM_Conn *conn, GTM_PGXCNodeType type, const char *host, GTM_PGXCNodePort port,
+ char *node_name, char *datafolder, GTM_PGXCNodeStatus status);
+
int node_unregister(GTM_Conn *conn, GTM_PGXCNodeType type, const char *node_name);
+int bkup_node_unregister(GTM_Conn *conn, GTM_PGXCNodeType type, const char * node_name);
int backend_disconnect(GTM_Conn *conn, bool is_postmaster, GTM_PGXCNodeType type, char *node_name);
char *node_get_local_addr(GTM_Conn *conn, char *buf, size_t buflen, int *rc);
@@ -223,20 +254,32 @@ char *node_get_local_addr(GTM_Conn *conn, char *buf, size_t buflen, int *rc);
int open_sequence(GTM_Conn *conn, GTM_SequenceKey key, GTM_Sequence increment,
GTM_Sequence minval, GTM_Sequence maxval,
GTM_Sequence startval, bool cycle);
+int bkup_open_sequence(GTM_Conn *conn, GTM_SequenceKey key, GTM_Sequence increment,
+ GTM_Sequence minval, GTM_Sequence maxval,
+ GTM_Sequence startval, bool cycle);
int alter_sequence(GTM_Conn *conn, GTM_SequenceKey key, GTM_Sequence increment,
GTM_Sequence minval, GTM_Sequence maxval,
GTM_Sequence startval, GTM_Sequence lastval, bool cycle, bool is_restart);
+int bkup_alter_sequence(GTM_Conn *conn, GTM_SequenceKey key, GTM_Sequence increment,
+ GTM_Sequence minval, GTM_Sequence maxval,
+ GTM_Sequence startval, GTM_Sequence lastval, bool cycle, bool is_restart);
int close_sequence(GTM_Conn *conn, GTM_SequenceKey key);
+int bkup_close_sequence(GTM_Conn *conn, GTM_SequenceKey key);
int rename_sequence(GTM_Conn *conn, GTM_SequenceKey key, GTM_SequenceKey newkey);
+int bkup_rename_sequence(GTM_Conn *conn, GTM_SequenceKey key, GTM_SequenceKey newkey);
GTM_Sequence get_current(GTM_Conn *conn, GTM_SequenceKey key);
GTM_Sequence get_next(GTM_Conn *conn, GTM_SequenceKey key);
+GTM_Sequence bkup_get_next(GTM_Conn *conn, GTM_SequenceKey key);
int set_val(GTM_Conn *conn, GTM_SequenceKey key, GTM_Sequence nextval, bool is_called);
+int bkup_set_val(GTM_Conn *conn, GTM_SequenceKey key, GTM_Sequence nextval, bool is_called);
int reset_sequence(GTM_Conn *conn, GTM_SequenceKey key);
+int bkup_reset_sequence(GTM_Conn *conn, GTM_SequenceKey key);
/*
* GTM-Standby
*/
int set_begin_end_backup(GTM_Conn *conn, bool begin);
+int gtm_sync_standby(GTM_Conn *conn);
#endif
diff --git a/src/include/gtm/gtm_msg.h b/src/include/gtm/gtm_msg.h
index c7c1259eba..b22a709b0f 100644
--- a/src/include/gtm/gtm_msg.h
+++ b/src/include/gtm/gtm_msg.h
@@ -14,47 +14,74 @@
#ifndef GTM_MSG_H
#define GTM_MSG_H
+/*
+ * The following enum symbols are also used in message_name_tab structure
+ * in gtm_utils.c. Modification of the following enum should reflect
+ * changes to message_name_tab structure as well.
+ */
typedef enum GTM_MessageType
{
MSG_TYPE_INVALID,
- MSG_NODE_REGISTER, /* Register a PGXC Node with GTM */
- MSG_NODE_UNREGISTER, /* Unregister a PGXC Node with GTM */
- MSG_NODE_LIST,
+ MSG_SYNC_STANDBY, /* Message to sync woth GTM-Standby */
+ MSG_NODE_REGISTER, /* Register a PGXC Node with GTM */
+ MSG_BKUP_NODE_REGISTER, /* Backup of MSG_NODE_REGISTER */
+ MSG_NODE_UNREGISTER, /* Unregister a PGXC Node with GTM */
+ MSG_BKUP_NODE_UNREGISTER, /* Backup of MSG_NODE_UNREGISTER */
+ MSG_NODE_LIST, /* Get node list */
MSG_NODE_BEGIN_REPLICATION_INIT,
MSG_NODE_END_REPLICATION_INIT,
- MSG_BEGIN_BACKUP, /* Start backup by Standby */
- MSG_END_BACKUP, /* End backup preparation by Standby */
- MSG_TXN_BEGIN, /* Start a new transaction */
- MSG_TXN_BEGIN_GETGXID, /* Start a new transaction and get GXID */
- MSG_TXN_BEGIN_GETGXID_MULTI, /* Start multiple new transactions and get GXIDs */
- MSG_TXN_START_PREPARED, /* Begins to prepare a transation for commit */
+ MSG_BEGIN_BACKUP, /* Start backup by Standby */
+ MSG_END_BACKUP, /* End backup preparation by Standby */
+ MSG_TXN_BEGIN, /* Start a new transaction */
+ MSG_BKUP_TXN_BEGIN, /* Backup of MSG_TXN_BEGIN */
+ MSG_TXN_BEGIN_GETGXID, /* Start a new transaction and get GXID */
+ MSG_BKUP_TXN_BEGIN_GETGXID, /* Backup of MSG_TXN_BEGIN_GETGXID */
+ MSG_TXN_BEGIN_GETGXID_MULTI, /* Start multiple new transactions and get GXIDs */
+ MSG_BKUP_TXN_BEGIN_GETGXID_MULTI, /* Backup of MSG_TXN_BEGIN_GETGXID_MULTI */
+ MSG_TXN_START_PREPARED, /* Begins to prepare a transation for commit */
+ MSG_BKUP_TXN_START_PREPARED, /* Backup of MSG_TXN_START_PREPARED */
MSG_TXN_COMMIT, /* Commit a running or prepared transaction */
- MSG_TXN_COMMIT_MULTI, /* Commit multiple running or prepared transactions */
- MSG_TXN_COMMIT_PREPARED, /* Commit a prepared transaction */
+ MSG_BKUP_TXN_COMMIT, /* Backup of MSG_TXN_COMMIT */
+ MSG_TXN_COMMIT_MULTI, /* Commit multiple running or prepared transactions */
+ MSG_BKUP_TXN_COMMIT_MULTI, /* Bacukp of MSG_TXN_COMMIT_MULTI */
+ MSG_TXN_COMMIT_PREPARED, /* Commit a prepared transaction */
+ MSG_BKUP_TXN_COMMIT_PREPARED, /* Backup of MSG_TXN_COMMIT_PREPARED */
MSG_TXN_PREPARE, /* Finish preparing a transaction */
+ MSG_BKUP_TXN_PREPARE, /* Backup of MSG_TXN_PREPARE */
MSG_TXN_ROLLBACK, /* Rollback a transaction */
- MSG_TXN_ROLLBACK_MULTI, /* Rollback multiple transactions */
+ MSG_BKUP_TXN_ROLLBACK, /* Backup of MSG_TXN_ROLLBACK */
+ MSG_TXN_ROLLBACK_MULTI, /* Rollback multiple transactions */
+ MSG_BKUP_TXN_ROLLBACK_MULTI, /* Backup of MSG_TXN_ROLLBACK_MULTI */
MSG_TXN_GET_GID_DATA, /* Get info associated with a GID, and get a GXID */
MSG_TXN_GET_GXID, /* Get a GXID for a transaction */
- MSG_TXN_GET_NEXT_GXID, /* Get next GXID */
+ MSG_BKUP_TXN_GET_GXID,
+ MSG_TXN_GET_NEXT_GXID, /* Get next GXID */
MSG_TXN_GXID_LIST,
MSG_SNAPSHOT_GET, /* Get a global snapshot */
MSG_SNAPSHOT_GET_MULTI, /* Get multiple global snapshots */
MSG_SNAPSHOT_GXID_GET, /* Get GXID and snapshot together */
MSG_SEQUENCE_INIT, /* Initialize a new global sequence */
+ MSG_BKUP_SEQUENCE_INIT, /* Backup of MSG_SEQUENCE_INIT */
MSG_SEQUENCE_GET_CURRENT,/* Get the current value of sequence */
- MSG_SEQUENCE_GET_NEXT, /* Get the next sequence value of sequence */
+ MSG_SEQUENCE_GET_NEXT, /* Get the next sequence value of sequence */
+ MSG_BKUP_SEQUENCE_GET_NEXT, /* Backup of MSG_SEQUENCE_GET_NEXT */
MSG_SEQUENCE_GET_LAST, /* Get the last sequence value of sequence */
- MSG_SEQUENCE_SET_VAL, /* Set values for sequence */
- MSG_SEQUENCE_RESET, /* Reset the sequence */
- MSG_SEQUENCE_CLOSE, /* Close a previously inited sequence */
- MSG_SEQUENCE_RENAME, /* Rename a sequence */
- MSG_SEQUENCE_ALTER, /* Alter a sequence */
+ MSG_SEQUENCE_SET_VAL, /* Set values for sequence */
+ MSG_BKUP_SEQUENCE_SET_VAL, /* Backup of MSG_SEQUENCE_SET_VAL */
+ MSG_SEQUENCE_RESET, /* Reset the sequence */
+ MSG_BKUP_SEQUENCE_RESET, /* Backup of MSG_SEQUENCE_RESET */
+ MSG_SEQUENCE_CLOSE, /* Close a previously inited sequence */
+ MSG_BKUP_SEQUENCE_CLOSE, /* Backup of MSG_SEQUENCE_CLOSE */
+ MSG_SEQUENCE_RENAME, /* Rename a sequence */
+ MSG_BKUP_SEQUENCE_RENAME, /* Backup of MSG_SEQUENCE_RENAME */
+ MSG_SEQUENCE_ALTER, /* Alter a sequence */
+ MSG_BKUP_SEQUENCE_ALTER, /* Backup of MSG_SEQUENCE_ALTER */
MSG_SEQUENCE_LIST, /* Get a list of sequences */
MSG_TXN_GET_STATUS, /* Get status of a given transaction */
MSG_TXN_GET_ALL_PREPARED, /* Get information about all outstanding
* prepared transactions */
- MSG_TXN_BEGIN_GETGXID_AUTOVACUUM, /* Start a new transaction and get GXID for autovacuum */
+ MSG_TXN_BEGIN_GETGXID_AUTOVACUUM, /* Start a new transaction and get GXID for autovacuum */
+ MSG_BKUP_TXN_BEGIN_GETGXID_AUTOVACUUM, /* Backup of MSG_TXN_BEGIN_GETGXID_AUTOVACUUM */
MSG_DATA_FLUSH, /* flush pending data */
MSG_BACKEND_DISCONNECT, /* tell GTM that the backend diconnected from the proxy */
@@ -64,8 +91,13 @@ typedef enum GTM_MessageType
MSG_TYPE_COUNT /* A dummmy entry just to count the message types */
} GTM_MessageType;
+/*
+ * Symbols in the following enum are usd in result_name_tab defined in gtm_utils.c.
+ * Modifictaion to the following enum should be reflected to result_name_tab as well.
+ */
typedef enum GTM_ResultType
{
+ SYNC_STANDBY_RESULT,
NODE_REGISTER_RESULT,
NODE_UNREGISTER_RESULT,
NODE_LIST_RESULT,
@@ -103,6 +135,7 @@ typedef enum GTM_ResultType
TXN_GET_STATUS_RESULT,
TXN_GET_ALL_PREPARED_RESULT,
TXN_BEGIN_GETGXID_AUTOVACUUM_RESULT,
+ RESULT_TYPE_COUNT
} GTM_ResultType;
/*
diff --git a/src/include/gtm/gtm_opt.h b/src/include/gtm/gtm_opt.h
index fd8a3101d8..b475d34e1d 100644
--- a/src/include/gtm/gtm_opt.h
+++ b/src/include/gtm/gtm_opt.h
@@ -351,6 +351,7 @@ const char *const config_type_names[] =\
#define GTM_OPTNAME_PORT "port"
#define GTM_OPTNAME_STARTUP "startup"
#define GTM_OPTNAME_STATUS_READER "status_reader"
+#define GTM_OPTNAME_SYNCHRONOUS_BACKUP "synchronous_backup"
#define GTM_OPTNAME_WORKER_THREADS "worker_threads"
diff --git a/src/include/gtm/gtm_seq.h b/src/include/gtm/gtm_seq.h
index 92174eecc5..77478eab47 100644
--- a/src/include/gtm/gtm_seq.h
+++ b/src/include/gtm/gtm_seq.h
@@ -76,14 +76,14 @@ int GTM_SeqSetVal(GTM_SequenceKey seqkey, GTM_Sequence nextval, bool iscalled);
int GTM_SeqReset(GTM_SequenceKey seqkey);
-void ProcessSequenceInitCommand(Port *myport, StringInfo message);
+void ProcessSequenceInitCommand(Port *myport, StringInfo message, bool is_backup);
void ProcessSequenceGetCurrentCommand(Port *myport, StringInfo message);
-void ProcessSequenceGetNextCommand(Port *myport, StringInfo message);
-void ProcessSequenceSetValCommand(Port *myport, StringInfo message);
-void ProcessSequenceResetCommand(Port *myport, StringInfo message);
-void ProcessSequenceCloseCommand(Port *myport, StringInfo message);
-void ProcessSequenceRenameCommand(Port *myport, StringInfo message);
-void ProcessSequenceAlterCommand(Port *myport, StringInfo message);
+void ProcessSequenceGetNextCommand(Port *myport, StringInfo message, bool is_backup);
+void ProcessSequenceSetValCommand(Port *myport, StringInfo message, bool is_backup);
+void ProcessSequenceResetCommand(Port *myport, StringInfo message, bool is_backup);
+void ProcessSequenceCloseCommand(Port *myport, StringInfo message, bool is_backup);
+void ProcessSequenceRenameCommand(Port *myport, StringInfo message, bool is_backup);
+void ProcessSequenceAlterCommand(Port *myport, StringInfo message, bool is_backup);
void ProcessSequenceListCommand(Port *myport, StringInfo message);
diff --git a/src/include/gtm/gtm_txn.h b/src/include/gtm/gtm_txn.h
index 6cd5181a96..dae4cc143f 100644
--- a/src/include/gtm/gtm_txn.h
+++ b/src/include/gtm/gtm_txn.h
@@ -220,25 +220,42 @@ GTM_Snapshot GTM_GetTransactionSnapshot(GTM_TransactionHandle handle[],
void GTM_FreeCachedTransInfo(void);
void ProcessBeginTransactionCommand(Port *myport, StringInfo message);
+void ProcessBkupBeginTransactionCommand(Port *myport, StringInfo message);
+void GTM_BkupBeginTransactionMulti(char *coord_name,
+ GTM_TransactionHandle *txn,
+ GTM_IsolationLevel *isolevel,
+ bool *readonly,
+ GTMProxy_ConnID *connid,
+ int txn_count);
+
void ProcessBeginTransactionCommandMulti(Port *myport, StringInfo message);
void ProcessBeginTransactionGetGXIDCommand(Port *myport, StringInfo message);
-void ProcessCommitTransactionCommand(Port *myport, StringInfo message);
-void ProcessCommitPreparedTransactionCommand(Port *myport, StringInfo message);
-void ProcessRollbackTransactionCommand(Port *myport, StringInfo message);
-void ProcessStartPreparedTransactionCommand(Port *myport, StringInfo message);
-void ProcessPrepareTransactionCommand(Port *myport, StringInfo message);
+void ProcessCommitTransactionCommand(Port *myport, StringInfo message, bool is_backup);
+void ProcessCommitPreparedTransactionCommand(Port *myport, StringInfo message, bool is_backup);
+void ProcessRollbackTransactionCommand(Port *myport, StringInfo message, bool is_backup);
+void ProcessStartPreparedTransactionCommand(Port *myport, StringInfo message, bool is_backup);
+void ProcessPrepareTransactionCommand(Port *myport, StringInfo message, bool is_backup);
void ProcessGetGIDDataTransactionCommand(Port *myport, StringInfo message);
void ProcessGetGXIDTransactionCommand(Port *myport, StringInfo message);
void ProcessGXIDListCommand(Port *myport, StringInfo message);
void ProcessGetNextGXIDTransactionCommand(Port *myport, StringInfo message);
void ProcessBeginTransactionGetGXIDAutovacuumCommand(Port *myport, StringInfo message);
+void ProcessBkupBeginTransactionGetGXIDAutovacuumCommand(Port *myport, StringInfo message);
+
void ProcessBeginTransactionGetGXIDCommandMulti(Port *myport, StringInfo message);
-void ProcessCommitTransactionCommandMulti(Port *myport, StringInfo message);
-void ProcessRollbackTransactionCommandMulti(Port *myport, StringInfo message) ;
+void ProcessCommitTransactionCommandMulti(Port *myport, StringInfo message, bool is_backup);
+void ProcessRollbackTransactionCommandMulti(Port *myport, StringInfo message, bool is_backup) ;
void GTM_SaveTxnInfo(int ctlfd);
void GTM_RestoreTxnInfo(int ctlfd, GlobalTransactionId next_gxid);
+void GTM_BkupBeginTransaction(char *coord_name,
+ GTM_TransactionHandle txn,
+ GTM_IsolationLevel isolevel,
+ bool readonly);
+void ProcessBkupBeginTransactionGetGXIDCommand(Port *myport, StringInfo message);
+void ProcessBkupBeginTransactionGetGXIDCommandMulti(Port *myport, StringInfo message);
+
/*
* In gtm_snap.c
diff --git a/src/include/gtm/gtm_utils.h b/src/include/gtm/gtm_utils.h
index 245daa9114..bea9fb38fa 100644
--- a/src/include/gtm/gtm_utils.h
+++ b/src/include/gtm/gtm_utils.h
@@ -15,6 +15,7 @@
#define GTM_UTILS_H
#include "gtm/libpq-int.h"
+#include "gtm/gtm_msg.h"
#if 0
/*
@@ -25,4 +26,8 @@
void gtm_report_failure(GTM_Conn *);
#endif
+void gtm_util_init_nametabs(void);
+char *gtm_util_message_name(GTM_MessageType type);
+char *gtm_util_result_name(GTM_ResultType type);
+
#endif /* GTM_UTIL_H */
diff --git a/src/include/gtm/register.h b/src/include/gtm/register.h
index 15674ec59a..e8aa8c1bf0 100644
--- a/src/include/gtm/register.h
+++ b/src/include/gtm/register.h
@@ -79,8 +79,8 @@ void Recovery_SaveRegisterInfo(void);
void Recovery_PGXCNodeDisconnect(Port *myport);
void Recovery_SaveRegisterFileName(char *dir);
-void ProcessPGXCNodeRegister(Port *myport, StringInfo message);
-void ProcessPGXCNodeUnregister(Port *myport, StringInfo message);
+void ProcessPGXCNodeRegister(Port *myport, StringInfo message, bool is_backup);
+void ProcessPGXCNodeUnregister(Port *myport, StringInfo message, bool is_backup);
void ProcessPGXCNodeBackendDisconnect(Port *myport, StringInfo message);
void ProcessPGXCNodeList(Port *myport, StringInfo message);