4 * PostgreSQL transaction-commit-log manager
6 * Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
14 #include "access/xlog.h"
17 * Possible transaction statuses --- note that all-zeroes is the initial
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 TransactionIdSetStatus(TransactionId xid
, XidStatus status
, XLogRecPtr lsn
);
36 extern XidStatus
TransactionIdGetStatus(TransactionId xid
, XLogRecPtr
*lsn
);
38 extern Size
CLOGShmemSize(void);
39 extern void CLOGShmemInit(void);
40 extern void BootStrapCLOG(void);
41 extern void StartupCLOG(void);
42 extern void ShutdownCLOG(void);
43 extern void CheckPointCLOG(void);
44 extern void ExtendCLOG(TransactionId newestXact
);
45 extern void TruncateCLOG(TransactionId oldestXact
);
48 #define CLOG_ZEROPAGE 0x00
49 #define CLOG_TRUNCATE 0x10
51 extern void clog_redo(XLogRecPtr lsn
, XLogRecord
*record
);
52 extern void clog_desc(StringInfo buf
, uint8 xl_info
, char *rec
);