Consistently use "superuser" instead of "super user"
[pgsql.git] / src / include / access / clog.h
blob39b8e4afa8a48f286fa1c17c106c91525db6db96
1 /*
2 * clog.h
4 * PostgreSQL transaction-commit-log 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/clog.h
11 #ifndef CLOG_H
12 #define CLOG_H
14 #include "access/xlogreader.h"
15 #include "storage/sync.h"
16 #include "lib/stringinfo.h"
19 * Possible transaction statuses --- note that all-zeroes is the initial
20 * state.
22 * A "subcommitted" transaction is a committed subtransaction whose parent
23 * hasn't committed or aborted yet.
25 typedef int XidStatus;
27 #define TRANSACTION_STATUS_IN_PROGRESS 0x00
28 #define TRANSACTION_STATUS_COMMITTED 0x01
29 #define TRANSACTION_STATUS_ABORTED 0x02
30 #define TRANSACTION_STATUS_SUB_COMMITTED 0x03
32 typedef struct xl_clog_truncate
34 int pageno;
35 TransactionId oldestXact;
36 Oid oldestXactDb;
37 } xl_clog_truncate;
39 extern void TransactionIdSetTreeStatus(TransactionId xid, int nsubxids,
40 TransactionId *subxids, XidStatus status, XLogRecPtr lsn);
41 extern XidStatus TransactionIdGetStatus(TransactionId xid, XLogRecPtr *lsn);
43 extern Size CLOGShmemBuffers(void);
44 extern Size CLOGShmemSize(void);
45 extern void CLOGShmemInit(void);
46 extern void BootStrapCLOG(void);
47 extern void StartupCLOG(void);
48 extern void TrimCLOG(void);
49 extern void CheckPointCLOG(void);
50 extern void ExtendCLOG(TransactionId newestXact);
51 extern void TruncateCLOG(TransactionId oldestXact, Oid oldestxid_datoid);
53 extern int clogsyncfiletag(const FileTag *ftag, char *path);
55 /* XLOG stuff */
56 #define CLOG_ZEROPAGE 0x00
57 #define CLOG_TRUNCATE 0x10
59 extern void clog_redo(XLogReaderState *record);
60 extern void clog_desc(StringInfo buf, XLogReaderState *record);
61 extern const char *clog_identify(uint8 info);
63 #endif /* CLOG_H */