!632 重构time stamp相关代码实现

Merge pull request !632 from 赵文浩/master
This commit is contained in:
opengauss-bot
2021-02-08 16:48:36 +08:00
committed by Gitee
4 changed files with 47 additions and 30 deletions

View File

@ -94,6 +94,24 @@ do {
#define MAX_INT32 2147483600
#endif
#define MAXTIMESTAMPLEN 128
/*
* HA wal replication timestamp info
*/
typedef struct WalReplicationTimestampInfo {
char nowTimeStamp[MAXTIMESTAMPLEN + 1];
char timeoutStamp[MAXTIMESTAMPLEN + 1];
char lastRecStamp[MAXTIMESTAMPLEN + 1];
char heartbeatStamp[MAXTIMESTAMPLEN + 1];
TimestampTz timeout;
TimestampTz nowtime;
TimestampTz last_timestamp;
TimestampTz heartbeat;
} WalReplicationTimestampInfo;
void WalReplicationTimestampToString(WalReplicationTimestampInfo *timeStampInfo);
/*
* timestamp.c prototypes
*/