Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
d0273c07
Commit
d0273c07
authored
Jul 04, 2000
by
Vadim B. Mikheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
misc
parent
e1a118e5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
12 deletions
+28
-12
src/backend/access/transam/xlog.c
src/backend/access/transam/xlog.c
+2
-2
src/include/access/htup.h
src/include/access/htup.h
+9
-1
src/include/access/rmgr.h
src/include/access/rmgr.h
+8
-7
src/include/access/xlog.h
src/include/access/xlog.h
+5
-1
src/include/storage/itemptr.h
src/include/storage/itemptr.h
+4
-1
No files found.
src/backend/access/transam/xlog.c
View file @
d0273c07
...
...
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.1
6 2000/06/02 15:57:16 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.1
7 2000/07/04 01:49:43 vadim
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1402,7 +1402,7 @@ StartupXLOG()
record
=
ReadRecord
(
&
RecPtr
,
buffer
);
if
(
TransactionIdIsValid
(
record
->
xl_xid
)
&&
!
TransactionIdDidCommit
(
record
->
xl_xid
))
RmgrTable
[
record
->
xl_rmid
].
rm_undo
(
record
);
RmgrTable
[
record
->
xl_rmid
].
rm_undo
(
EndRecPtr
,
record
);
RecPtr
=
record
->
xl_prev
;
}
while
(
XLByteLE
(
checkPoint
.
undo
,
RecPtr
));
elog
(
LOG
,
"Undo done at (%u, %u)"
,
...
...
src/include/access/htup.h
View file @
d0273c07
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: htup.h,v 1.3
2 2000/07/03 02:54:17
vadim Exp $
* $Id: htup.h,v 1.3
3 2000/07/04 01:49:43
vadim Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -87,6 +87,8 @@ typedef struct xl_heap_delete
xl_heaptid
dtid
;
/* deleted tuple id */
}
xl_heap_delete
;
#define SizeOfHeapDelete (offsetof(xl_heaptid, tid) + SizeOfIptrData))
/* This is what we need to know about insert - 26 + data */
typedef
struct
xl_heap_insert
{
...
...
@@ -99,6 +101,8 @@ typedef struct xl_heap_insert
/* TUPLE DATA FOLLOWS AT END OF STRUCT */
}
xl_heap_insert
;
#define SizeOfHeapInsert (offsetof(xl_heap_insert, mask) + sizeof(uint8))
/* This is what we need to know about update - 28 + data */
typedef
struct
xl_heap_update
{
...
...
@@ -111,6 +115,8 @@ typedef struct xl_heap_update
/* NEW TUPLE DATA FOLLOWS AT END OF STRUCT */
}
xl_heap_update
;
#define SizeOfHeapUpdate (offsetof(xl_heap_update, mask) + sizeof(uint8))
/* This is what we need to know about tuple move - 24 bytes */
typedef
struct
xl_heap_move
{
...
...
@@ -118,6 +124,8 @@ typedef struct xl_heap_move
ItemPointerData
ttid
;
/* moved to */
}
xl_heap_move
;
#define SizeOfHeapMove (offsetof(xl_heap_move, ttid) + SizeOfIptrData))
/* end of XLOG stuff */
#endif
/* XLOG */
...
...
src/include/access/rmgr.h
View file @
d0273c07
...
...
@@ -13,8 +13,8 @@ typedef uint8 RmgrId;
typedef
struct
RmgrData
{
char
*
rm_name
;
char
*
(
*
rm_redo
)
();
/* REDO(XLogRecPtr
rptr) */
char
*
(
*
rm_undo
)
();
/* UNDO(XLogRecPtr
rptr) */
void
(
*
rm_redo
)();
/* REDO(XLogRecPtr lsn, XLogRecord
rptr) */
void
(
*
rm_undo
)();
/* UNDO(XLogRecPtr lsn, XLogRecord
rptr) */
}
RmgrData
;
extern
RmgrData
*
RmgrTable
;
...
...
@@ -24,11 +24,12 @@ extern RmgrData *RmgrTable;
*/
#define RM_XLOG_ID 0
#define RM_XACT_ID 1
#define RM_HEAP_ID 2
#define RM_BTREE_ID 3
#define RM_HASH_ID 4
#define RM_RTREE_ID 5
#define RM_GIST_ID 6
#define RM_SMGR_ID 2
#define RM_HEAP_ID 10
#define RM_BTREE_ID 11
#define RM_HASH_ID 12
#define RM_RTREE_ID 13
#define RM_GIST_ID 14
#define RM_MAX_ID RM_GIST_ID
#endif
/* RMGR_H */
src/include/access/xlog.h
View file @
d0273c07
...
...
@@ -22,7 +22,7 @@ typedef struct XLogRecord
XLogRecPtr
xl_prev
;
/* ptr to previous record in log */
XLogRecPtr
xl_xact_prev
;
/* ptr to previous record of this xact */
TransactionId
xl_xid
;
/* xact id */
uint16
xl_len
;
/* len of record on this page */
uint16
xl_len
;
/* len of record
*data*
on this page */
uint8
xl_info
;
RmgrId
xl_rmid
;
/* resource manager inserted this record */
...
...
@@ -32,6 +32,10 @@ typedef struct XLogRecord
#define SizeOfXLogRecord DOUBLEALIGN(sizeof(XLogRecord))
#define MAXLOGRECSZ (2 * BLCKSZ)
#define XLogRecGetData(record) \
((char*)record + SizeOfXLogRecord)
/*
* When there is no space on current page we continue on the next
* page with subrecord.
...
...
src/include/storage/itemptr.h
View file @
d0273c07
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: itemptr.h,v 1.1
4 2000/01/26 05:58:33 momjian
Exp $
* $Id: itemptr.h,v 1.1
5 2000/07/04 01:49:44 vadim
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -30,6 +30,9 @@ typedef struct ItemPointerData
OffsetNumber
ip_posid
;
}
ItemPointerData
;
#define SizeOfIptrData \
(offsetof(ItemPointerData, ip_posid) + sizeof(OffsetNumber))
typedef
ItemPointerData
*
ItemPointer
;
/* ----------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment