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
8e953214
Commit
8e953214
authored
Sep 12, 2000
by
Vadim B. Mikheev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btree WAL records.
parent
0d93504c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
67 additions
and
1 deletion
+67
-1
src/include/access/nbtree.h
src/include/access/nbtree.h
+67
-1
No files found.
src/include/access/nbtree.h
View file @
8e953214
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: nbtree.h,v 1.4
1 2000/08/10 02:33:19 inoue
Exp $
* $Id: nbtree.h,v 1.4
2 2000/09/12 06:07:52 vadim
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -183,6 +183,72 @@ typedef BTStackData *BTStack;
#define P_FIRSTKEY ((OffsetNumber) 2)
#define P_FIRSTDATAKEY(opaque) (P_RIGHTMOST(opaque) ? P_HIKEY : P_FIRSTKEY)
#ifdef XLOG
/* XLOG stuff */
/*
* XLOG allows to store some information in high 4 bits of log
* record xl_info field
*/
#define XLOG_BTREE_DELETE 0x00
/* delete btitem */
#define XLOG_BTREE_INSERT 0x10
/* add btitem without split */
#define XLOG_BTREE_SPLIT 0x20
/* add btitem with split */
#define XLOG_BTREE_ONLEFT 0x40
/* flag for split case: new btitem */
/* goes to the left sibling */
/*
* All what we need to find changed index tuple (18 bytes)
*/
typedef
struct
xl_btreetid
{
RelFileNode
node
;
CommandId
cid
;
/* this is for "better" tuple' */
/* identification - it allows to avoid */
/* "compensation" records for undo */
ItemPointerData
tid
;
/* changed tuple id */
}
xl_btreetid
;
/* This is what we need to know about delete - ALIGN(18) = 24 bytes */
typedef
struct
xl_btree_delete
{
xl_btreetid
target
;
/* deleted tuple id */
}
xl_btree_delete
;
#define SizeOfBtreeDelete (offsetof(xl_btreetid, tid) + SizeOfIptrData))
/* This is what we need to know about pure (without split) insert - 26 + key data */
typedef
struct
xl_btree_insert
{
xl_btreetid
target
;
/* inserted tuple id */
BTItemData
btitem
;
/* KEY DATA FOLLOWS AT END OF STRUCT */
}
xl_btree_insert
;
#define SizeOfBtreeInsert (offsetof(xl_btree_insert, btitem) + sizeof(BTItemData))
/* This is what we need to know about insert with split - 26 + right sibling btitems */
typedef
struct
xl_btree_split
{
xl_btreetid
target
;
/* inserted tuple id */
BlockNumber
othblk
;
/* second block participated in split: */
/* first one is stored in target' tid */
BlockNumber
parblk
;
/* parent block to be updated */
/*
* We log all btitems from the right sibling. If new btitem goes on
* the left sibling then we log it too and it will be first BTItemData
* at the end of this struct.
*/
}
xl_btree_split
;
#define SizeOfBtreeSplit (offsetof(xl_btree_insert, parblk) + sizeof(BlockNumber))
/* end of XLOG stuff */
#endif
/* XLOG */
/*
* Operator strategy numbers -- ordering of these is <, <=, =, >=, >
*/
...
...
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