Fix pg_dump bug in the database-level collation patch. "datcollate" and
[PostgreSQL.git] / src / include / access / clog.h
blob38308cc7e462ca50bdcf9e12a5a316812df2c61b
1 /*
2 * clog.h
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
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 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);
47 /* XLOG stuff */
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);
54 #endif /* CLOG_H */