mirror of
https://github.com/postgres/postgres.git
synced 2025-10-29 22:49:41 +03:00
WAL
This commit is contained in:
@@ -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.45 2000/10/13 12:05:22 vadim Exp $
|
||||
* $Id: nbtree.h,v 1.46 2000/10/21 15:43:33 vadim Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -266,9 +266,9 @@ typedef struct xl_btree_insert
|
||||
typedef struct xl_btree_split
|
||||
{
|
||||
xl_btreetid target; /* inserted tuple id */
|
||||
BlockId otherblk; /* second block participated in split: */
|
||||
BlockIdData otherblk; /* second block participated in split: */
|
||||
/* first one is stored in target' tid */
|
||||
BlockId rightblk; /* next right block */
|
||||
BlockIdData rightblk; /* next right block */
|
||||
/*
|
||||
* 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 the first
|
||||
@@ -277,7 +277,7 @@ typedef struct xl_btree_split
|
||||
*/
|
||||
} xl_btree_split;
|
||||
|
||||
#define SizeOfBtreeSplit (offsetof(xl_btree_insert, rightblk) + sizeof(BlockId))
|
||||
#define SizeOfBtreeSplit (offsetof(xl_btree_split, rightblk) + sizeof(BlockIdData))
|
||||
|
||||
/*
|
||||
* New root log record.
|
||||
@@ -285,11 +285,11 @@ typedef struct xl_btree_split
|
||||
typedef struct xl_btree_newroot
|
||||
{
|
||||
RelFileNode node;
|
||||
BlockId rootblk;
|
||||
BlockIdData rootblk;
|
||||
/* 0 or 2 BTITEMS FOLLOW AT END OF STRUCT */
|
||||
} xl_btree_newroot;
|
||||
|
||||
#define SizeOfBtreeNewroot (offsetof(xl_btree_newroot, rootblk) + sizeof(BlockId))
|
||||
#define SizeOfBtreeNewroot (offsetof(xl_btree_newroot, rootblk) + sizeof(BlockIdData))
|
||||
|
||||
/* end of XLOG stuff */
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
*
|
||||
* rmgr.h
|
||||
*
|
||||
* Resource managers description table
|
||||
* Resource managers definition
|
||||
*
|
||||
*/
|
||||
#ifndef RMGR_H
|
||||
@@ -10,15 +10,6 @@
|
||||
|
||||
typedef uint8 RmgrId;
|
||||
|
||||
typedef struct RmgrData
|
||||
{
|
||||
char *rm_name;
|
||||
void (*rm_redo)(); /* REDO(XLogRecPtr lsn, XLogRecord rptr) */
|
||||
void (*rm_undo)(); /* UNDO(XLogRecPtr lsn, XLogRecord rptr) */
|
||||
} RmgrData;
|
||||
|
||||
extern RmgrData *RmgrTable;
|
||||
|
||||
/*
|
||||
* Built-in resource managers
|
||||
*/
|
||||
|
||||
@@ -90,6 +90,17 @@ typedef XLogPageHeaderData *XLogPageHeader;
|
||||
typedef uint32 StartUpID;
|
||||
extern StartUpID ThisStartUpID;
|
||||
extern bool InRecovery;
|
||||
extern XLogRecPtr MyLastRecPtr;
|
||||
|
||||
typedef struct RmgrData
|
||||
{
|
||||
char *rm_name;
|
||||
void (*rm_redo)(XLogRecPtr lsn, XLogRecord *rptr);
|
||||
void (*rm_undo)(XLogRecPtr lsn, XLogRecord *rptr);
|
||||
void (*rm_desc)(char *buf, uint8 xl_info, char *rec);
|
||||
} RmgrData;
|
||||
|
||||
extern RmgrData RmgrTable[];
|
||||
|
||||
extern XLogRecPtr XLogInsert(RmgrId rmid, uint8 info,
|
||||
char *hdr, uint32 hdrlen,
|
||||
|
||||
Reference in New Issue
Block a user