Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
clog.h64 linesDownload Raw Back to access
1/*2 * clog.h3 *4 * PostgreSQL transaction-commit-log manager5 *6 * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group7 * Portions Copyright (c) 1994, Regents of the University of California8 *9 * src/include/access/clog.h10 */11#ifndef CLOG_H12#define CLOG_H13 14#include "access/xlogreader.h"15#include "storage/sync.h"16#include "lib/stringinfo.h"17 18/*19 * Possible transaction statuses --- note that all-zeroes is the initial20 * state.21 *22 * A "subcommitted" transaction is a committed subtransaction whose parent23 * hasn't committed or aborted yet.24 */25typedef int XidStatus;26 27#define TRANSACTION_STATUS_IN_PROGRESS		0x0028#define TRANSACTION_STATUS_COMMITTED		0x0129#define TRANSACTION_STATUS_ABORTED			0x0230#define TRANSACTION_STATUS_SUB_COMMITTED	0x0331 32typedef struct xl_clog_truncate33{34	int			pageno;35	TransactionId oldestXact;36	Oid			oldestXactDb;37} xl_clog_truncate;38 39extern void TransactionIdSetTreeStatus(TransactionId xid, int nsubxids,40									   TransactionId *subxids, XidStatus status, XLogRecPtr lsn);41extern XidStatus TransactionIdGetStatus(TransactionId xid, XLogRecPtr *lsn);42 43extern Size CLOGShmemBuffers(void);44extern Size CLOGShmemSize(void);45extern void CLOGShmemInit(void);46extern void BootStrapCLOG(void);47extern void StartupCLOG(void);48extern void TrimCLOG(void);49extern void CheckPointCLOG(void);50extern void ExtendCLOG(TransactionId newestXact);51extern void TruncateCLOG(TransactionId oldestXact, Oid oldestxid_datoid);52 53extern int	clogsyncfiletag(const FileTag *ftag, char *path);54 55/* XLOG stuff */56#define CLOG_ZEROPAGE		0x0057#define CLOG_TRUNCATE		0x1058 59extern void clog_redo(XLogReaderState *record);60extern void clog_desc(StringInfo buf, XLogReaderState *record);61extern const char *clog_identify(uint8 info);62 63#endif							/* CLOG_H */64 
codekingpro/portable-devtools · Team Ai