Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
8e953214
Commit
8e953214
authored
24 years ago
by
Vadim B. Mikheev
Browse files
Options
Downloads
Patches
Plain Diff
Btree WAL records.
parent
0d93504c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/include/access/nbtree.h
+67
-1
67 additions, 1 deletion
src/include/access/nbtree.h
with
67 additions
and
1 deletion
src/include/access/nbtree.h
+
67
−
1
View file @
8e953214
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* $Id: nbtree.h,v 1.4
1
2000/0
8
/1
0
0
2:33:19 inoue
Exp $
* $Id: nbtree.h,v 1.4
2
2000/0
9
/1
2
0
6:07:52 vadim
Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -183,6 +183,72 @@ typedef BTStackData *BTStack;
...
@@ -183,6 +183,72 @@ typedef BTStackData *BTStack;
#define P_FIRSTKEY ((OffsetNumber) 2)
#define P_FIRSTKEY ((OffsetNumber) 2)
#define P_FIRSTDATAKEY(opaque) (P_RIGHTMOST(opaque) ? P_HIKEY : P_FIRSTKEY)
#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 <, <=, =, >=, >
* Operator strategy numbers -- ordering of these is <, <=, =, >=, >
*/
*/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment