diff options
author | Vadim B. Mikheev <vadim4o@yahoo.com> | 2000-10-20 11:01:21 +0000 |
---|---|---|
committer | Vadim B. Mikheev <vadim4o@yahoo.com> | 2000-10-20 11:01:21 +0000 |
commit | b58c0411bad414a5dbde8b38f615867c68adf55c (patch) | |
tree | e50db15a8b3ea5dd2cf9d54ef433835bbdae1358 /src/include/access/xact.h | |
parent | e18a862d46fa3169c238a6b4a98a783c9a7896f9 (diff) | |
download | postgresql-b58c0411bad414a5dbde8b38f615867c68adf55c.tar.gz postgresql-b58c0411bad414a5dbde8b38f615867c68adf55c.zip |
redo/undo support functions and cleanups.
Diffstat (limited to 'src/include/access/xact.h')
-rw-r--r-- | src/include/access/xact.h | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/src/include/access/xact.h b/src/include/access/xact.h index c512a4a66f9..712e88b6005 100644 --- a/src/include/access/xact.h +++ b/src/include/access/xact.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: xact.h,v 1.27 2000/07/28 01:04:40 tgl Exp $ + * $Id: xact.h,v 1.28 2000/10/20 11:01:14 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -78,6 +78,35 @@ typedef TransactionStateData *TransactionState; (*((TransactionId*) (dest)) = NullTransactionId) +#ifdef XLOG + +/* + * XLOG allows to store some information in high 4 bits of log + * record xl_info field + */ +#define XLOG_XACT_COMMIT 0x00 +#define XLOG_XACT_ABORT 0x20 + +typedef struct xl_xact_commit +{ + time_t xtime; + /* + * Array of RelFileNode-s to drop may follow + * at the end of struct + */ +} xl_xact_commit; + +#define SizeOfXactCommit ((offsetof(xl_xact_commit, xtime) + sizeof(time_t))) + +typedef struct xl_xact_abort +{ + time_t xtime; +} xl_xact_abort; + +#define SizeOfXactAbort ((offsetof(xl_xact_abort, xtime) + sizeof(time_t))) + +#endif + /* ---------------- * extern definitions * ---------------- @@ -108,6 +137,9 @@ extern void AbortOutOfAnyTransaction(void); extern TransactionId DisabledTransactionId; +extern void XactPushRollback(void (*func) (void *), void* data); +extern void XactPopRollback(void); + /* defined in xid.c */ extern Datum xidin(PG_FUNCTION_ARGS); extern Datum xidout(PG_FUNCTION_ARGS); |