Consistently use "superuser" instead of "super user"
[pgsql.git] / src / include / access / commit_ts.h
bloba1538978c62efc76c05bea1603a6e9732c1bc59d
1 /*
2 * commit_ts.h
4 * PostgreSQL commit timestamp manager
6 * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
9 * src/include/access/commit_ts.h
11 #ifndef COMMIT_TS_H
12 #define COMMIT_TS_H
14 #include "access/xlog.h"
15 #include "datatype/timestamp.h"
16 #include "replication/origin.h"
17 #include "storage/sync.h"
20 extern PGDLLIMPORT bool track_commit_timestamp;
22 extern void TransactionTreeSetCommitTsData(TransactionId xid, int nsubxids,
23 TransactionId *subxids, TimestampTz timestamp,
24 RepOriginId nodeid);
25 extern bool TransactionIdGetCommitTsData(TransactionId xid,
26 TimestampTz *ts, RepOriginId *nodeid);
27 extern TransactionId GetLatestCommitTsData(TimestampTz *ts,
28 RepOriginId *nodeid);
30 extern Size CommitTsShmemBuffers(void);
31 extern Size CommitTsShmemSize(void);
32 extern void CommitTsShmemInit(void);
33 extern void BootStrapCommitTs(void);
34 extern void StartupCommitTs(void);
35 extern void CommitTsParameterChange(bool newvalue, bool oldvalue);
36 extern void CompleteCommitTsInitialization(void);
37 extern void CheckPointCommitTs(void);
38 extern void ExtendCommitTs(TransactionId newestXact);
39 extern void TruncateCommitTs(TransactionId oldestXact);
40 extern void SetCommitTsLimit(TransactionId oldestXact,
41 TransactionId newestXact);
42 extern void AdvanceOldestCommitTsXid(TransactionId oldestXact);
44 extern int committssyncfiletag(const FileTag *ftag, char *path);
46 /* XLOG stuff */
47 #define COMMIT_TS_ZEROPAGE 0x00
48 #define COMMIT_TS_TRUNCATE 0x10
50 typedef struct xl_commit_ts_set
52 TimestampTz timestamp;
53 RepOriginId nodeid;
54 TransactionId mainxid;
55 /* subxact Xids follow */
56 } xl_commit_ts_set;
58 #define SizeOfCommitTsSet (offsetof(xl_commit_ts_set, mainxid) + \
59 sizeof(TransactionId))
61 typedef struct xl_commit_ts_truncate
63 int pageno;
64 TransactionId oldestXid;
65 } xl_commit_ts_truncate;
67 #define SizeOfCommitTsTruncate (offsetof(xl_commit_ts_truncate, oldestXid) + \
68 sizeof(TransactionId))
70 extern void commit_ts_redo(XLogReaderState *record);
71 extern void commit_ts_desc(StringInfo buf, XLogReaderState *record);
72 extern const char *commit_ts_identify(uint8 info);
74 #endif /* COMMIT_TS_H */