Fix a few errors in comments. Patch by Fujii Masao, plus the one in
[PostgreSQL.git] / src / include / access / clog.h
blob5a14265c2fa3dda73b3449526fcf4b327ab7e883
1 /*
2 * clog.h
4 * PostgreSQL transaction-commit-log manager
6 * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
9 * $PostgreSQL$
11 #ifndef CLOG_H
12 #define CLOG_H
14 #include "access/xlog.h"
17 * Possible transaction statuses --- note that all-zeroes is the initial
18 * state.
20 * A "subcommitted" transaction is a committed subtransaction whose parent
21 * hasn't committed or aborted yet.
23 typedef int XidStatus;
25 #define TRANSACTION_STATUS_IN_PROGRESS 0x00
26 #define TRANSACTION_STATUS_COMMITTED 0x01
27 #define TRANSACTION_STATUS_ABORTED 0x02
28 #define TRANSACTION_STATUS_SUB_COMMITTED 0x03
31 /* Number of SLRU buffers to use for clog */
32 #define NUM_CLOG_BUFFERS 8
35 extern void TransactionIdSetTreeStatus(TransactionId xid, int nsubxids,
36 TransactionId *subxids, XidStatus status, XLogRecPtr lsn);
37 extern XidStatus TransactionIdGetStatus(TransactionId xid, XLogRecPtr *lsn);
39 extern Size CLOGShmemSize(void);
40 extern void CLOGShmemInit(void);
41 extern void BootStrapCLOG(void);
42 extern void StartupCLOG(void);
43 extern void ShutdownCLOG(void);
44 extern void CheckPointCLOG(void);
45 extern void ExtendCLOG(TransactionId newestXact);
46 extern void TruncateCLOG(TransactionId oldestXact);
48 /* XLOG stuff */
49 #define CLOG_ZEROPAGE 0x00
50 #define CLOG_TRUNCATE 0x10
52 extern void clog_redo(XLogRecPtr lsn, XLogRecord *record);
53 extern void clog_desc(StringInfo buf, uint8 xl_info, char *rec);
55 #endif /* CLOG_H */