PostgreSQL Source Code  git master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
hash_xlog.h File Reference
#include "access/xlogreader.h"
#include "lib/stringinfo.h"
#include "storage/off.h"
Include dependency graph for hash_xlog.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  xl_hash_createidx
 
struct  xl_hash_insert
 
struct  xl_hash_add_ovfl_page
 
struct  xl_hash_split_allocate_page
 
struct  xl_hash_split_complete
 
struct  xl_hash_move_page_contents
 
struct  xl_hash_squeeze_page
 
struct  xl_hash_delete
 
struct  xl_hash_update_meta_page
 
struct  xl_hash_init_meta_page
 
struct  xl_hash_init_bitmap_page
 
struct  xl_hash_vacuum_one_page
 

Macros

#define HASH_XLOG_FREE_OVFL_BUFS   6
 
#define XLOG_HASH_INIT_META_PAGE   0x00 /* initialize the meta page */
 
#define XLOG_HASH_INIT_BITMAP_PAGE   0x10 /* initialize the bitmap page */
 
#define XLOG_HASH_INSERT   0x20 /* add index tuple without split */
 
#define XLOG_HASH_ADD_OVFL_PAGE   0x30 /* add overflow page */
 
#define XLOG_HASH_SPLIT_ALLOCATE_PAGE   0x40 /* allocate new page for split */
 
#define XLOG_HASH_SPLIT_PAGE   0x50 /* split page */
 
#define XLOG_HASH_SPLIT_COMPLETE
 
#define XLOG_HASH_MOVE_PAGE_CONTENTS
 
#define XLOG_HASH_SQUEEZE_PAGE
 
#define XLOG_HASH_DELETE   0x90 /* delete index tuples from a page */
 
#define XLOG_HASH_SPLIT_CLEANUP
 
#define XLOG_HASH_UPDATE_META_PAGE
 
#define XLOG_HASH_VACUUM_ONE_PAGE   0xC0 /* remove dead tuples from index page */
 
#define XLH_SPLIT_META_UPDATE_MASKS   (1<<0)
 
#define XLH_SPLIT_META_UPDATE_SPLITPOINT   (1<<1)
 
#define SizeOfHashCreateIdx   (offsetof(xl_hash_createidx, ffactor) + sizeof(uint16))
 
#define SizeOfHashInsert   (offsetof(xl_hash_insert, offnum) + sizeof(OffsetNumber))
 
#define SizeOfHashAddOvflPage   (offsetof(xl_hash_add_ovfl_page, bmpage_found) + sizeof(bool))
 
#define SizeOfHashSplitAllocPage   (offsetof(xl_hash_split_allocate_page, flags) + sizeof(uint8))
 
#define SizeOfHashSplitComplete   (offsetof(xl_hash_split_complete, new_bucket_flag) + sizeof(uint16))
 
#define SizeOfHashMovePageContents   (offsetof(xl_hash_move_page_contents, is_prim_bucket_same_wrt) + sizeof(bool))
 
#define SizeOfHashSqueezePage   (offsetof(xl_hash_squeeze_page, is_prev_bucket_same_wrt) + sizeof(bool))
 
#define SizeOfHashDelete   (offsetof(xl_hash_delete, is_primary_bucket_page) + sizeof(bool))
 
#define SizeOfHashUpdateMetaPage   (offsetof(xl_hash_update_meta_page, ntuples) + sizeof(double))
 
#define SizeOfHashInitMetaPage   (offsetof(xl_hash_init_meta_page, ffactor) + sizeof(uint16))
 
#define SizeOfHashInitBitmapPage   (offsetof(xl_hash_init_bitmap_page, bmsize) + sizeof(uint16))
 
#define SizeOfHashVacuumOnePage   (offsetof(xl_hash_vacuum_one_page, ntuples) + sizeof(int))
 

Typedefs

typedef struct xl_hash_createidx xl_hash_createidx
 
typedef struct xl_hash_insert xl_hash_insert
 
typedef struct
xl_hash_add_ovfl_page 
xl_hash_add_ovfl_page
 
typedef struct
xl_hash_split_allocate_page 
xl_hash_split_allocate_page
 
typedef struct
xl_hash_split_complete 
xl_hash_split_complete
 
typedef struct
xl_hash_move_page_contents 
xl_hash_move_page_contents
 
typedef struct xl_hash_squeeze_page xl_hash_squeeze_page
 
typedef struct xl_hash_delete xl_hash_delete
 
typedef struct
xl_hash_update_meta_page 
xl_hash_update_meta_page
 
typedef struct
xl_hash_init_meta_page 
xl_hash_init_meta_page
 
typedef struct
xl_hash_init_bitmap_page 
xl_hash_init_bitmap_page
 
typedef struct
xl_hash_vacuum_one_page 
xl_hash_vacuum_one_page
 

Functions

void hash_redo (XLogReaderState *record)
 
void hash_desc (StringInfo buf, XLogReaderState *record)
 
const char * hash_identify (uint8 info)
 
void hash_mask (char *pagedata, BlockNumber blkno)
 

Macro Definition Documentation

#define HASH_XLOG_FREE_OVFL_BUFS   6

Definition at line 22 of file hash_xlog.h.

Referenced by _hash_freeovflpage().

#define SizeOfHashAddOvflPage   (offsetof(xl_hash_add_ovfl_page, bmpage_found) + sizeof(bool))

Definition at line 100 of file hash_xlog.h.

Referenced by _hash_addovflpage().

#define SizeOfHashCreateIdx   (offsetof(xl_hash_createidx, ffactor) + sizeof(uint16))

Definition at line 66 of file hash_xlog.h.

#define SizeOfHashDelete   (offsetof(xl_hash_delete, is_primary_bucket_page) + sizeof(bool))

Definition at line 206 of file hash_xlog.h.

Referenced by hashbucketcleanup().

#define SizeOfHashInitBitmapPage   (offsetof(xl_hash_init_bitmap_page, bmsize) + sizeof(uint16))

Definition at line 253 of file hash_xlog.h.

Referenced by _hash_init().

#define SizeOfHashInitMetaPage   (offsetof(xl_hash_init_meta_page, ffactor) + sizeof(uint16))

Definition at line 237 of file hash_xlog.h.

Referenced by _hash_init().

#define SizeOfHashInsert   (offsetof(xl_hash_insert, offnum) + sizeof(OffsetNumber))

Definition at line 81 of file hash_xlog.h.

Referenced by _hash_doinsert().

#define SizeOfHashMovePageContents   (offsetof(xl_hash_move_page_contents, is_prim_bucket_same_wrt) + sizeof(bool))

Definition at line 158 of file hash_xlog.h.

Referenced by _hash_squeezebucket().

#define SizeOfHashSplitAllocPage   (offsetof(xl_hash_split_allocate_page, flags) + sizeof(uint8))

Definition at line 120 of file hash_xlog.h.

Referenced by _hash_expandtable().

#define SizeOfHashSplitComplete   (offsetof(xl_hash_split_complete, new_bucket_flag) + sizeof(uint16))

Definition at line 137 of file hash_xlog.h.

Referenced by _hash_splitbucket().

#define SizeOfHashSqueezePage   (offsetof(xl_hash_squeeze_page, is_prev_bucket_same_wrt) + sizeof(bool))

Definition at line 187 of file hash_xlog.h.

Referenced by _hash_freeovflpage().

#define SizeOfHashUpdateMetaPage   (offsetof(xl_hash_update_meta_page, ntuples) + sizeof(double))

Definition at line 220 of file hash_xlog.h.

Referenced by hashbulkdelete().

#define SizeOfHashVacuumOnePage   (offsetof(xl_hash_vacuum_one_page, ntuples) + sizeof(int))
#define XLH_SPLIT_META_UPDATE_MASKS   (1<<0)

Definition at line 52 of file hash_xlog.h.

Referenced by _hash_expandtable(), hash_desc(), and hash_xlog_split_allocate_page().

#define XLH_SPLIT_META_UPDATE_SPLITPOINT   (1<<1)

Definition at line 53 of file hash_xlog.h.

Referenced by _hash_expandtable(), hash_desc(), and hash_xlog_split_allocate_page().

#define XLOG_HASH_ADD_OVFL_PAGE   0x30 /* add overflow page */

Definition at line 30 of file hash_xlog.h.

Referenced by _hash_addovflpage(), hash_desc(), hash_identify(), and hash_redo().

#define XLOG_HASH_DELETE   0x90 /* delete index tuples from a page */

Definition at line 40 of file hash_xlog.h.

Referenced by hash_desc(), hash_identify(), hash_redo(), and hashbucketcleanup().

#define XLOG_HASH_INIT_BITMAP_PAGE   0x10 /* initialize the bitmap page */

Definition at line 28 of file hash_xlog.h.

Referenced by _hash_init(), hash_desc(), hash_identify(), and hash_redo().

#define XLOG_HASH_INIT_META_PAGE   0x00 /* initialize the meta page */

Definition at line 27 of file hash_xlog.h.

Referenced by _hash_init(), hash_desc(), hash_identify(), and hash_redo().

#define XLOG_HASH_INSERT   0x20 /* add index tuple without split */

Definition at line 29 of file hash_xlog.h.

Referenced by _hash_doinsert(), hash_desc(), hash_identify(), and hash_redo().

#define XLOG_HASH_MOVE_PAGE_CONTENTS
Value:
0x70 /* remove tuples from one page
* and add to another page */

Definition at line 35 of file hash_xlog.h.

Referenced by _hash_squeezebucket(), hash_desc(), hash_identify(), and hash_redo().

#define XLOG_HASH_SPLIT_ALLOCATE_PAGE   0x40 /* allocate new page for split */

Definition at line 31 of file hash_xlog.h.

Referenced by _hash_expandtable(), hash_desc(), hash_identify(), and hash_redo().

#define XLOG_HASH_SPLIT_CLEANUP
Value:
0xA0 /* clear split-cleanup flag in primary
* bucket page after deleting tuples
* that are moved due to split */

Definition at line 41 of file hash_xlog.h.

Referenced by hash_identify(), hash_redo(), and hashbucketcleanup().

#define XLOG_HASH_SPLIT_COMPLETE
Value:
0x60 /* completion of split
* operation */

Definition at line 33 of file hash_xlog.h.

Referenced by _hash_splitbucket(), hash_desc(), hash_identify(), and hash_redo().

#define XLOG_HASH_SPLIT_PAGE   0x50 /* split page */

Definition at line 32 of file hash_xlog.h.

Referenced by hash_identify(), hash_redo(), and log_split_page().

#define XLOG_HASH_SQUEEZE_PAGE
Value:
0x80 /* add tuples to one of the previous
* pages in chain and free the ovfl
* page */

Definition at line 37 of file hash_xlog.h.

Referenced by _hash_freeovflpage(), hash_desc(), hash_identify(), and hash_redo().

#define XLOG_HASH_UPDATE_META_PAGE
Value:
0xB0 /* update meta page after
* vacuum */

Definition at line 44 of file hash_xlog.h.

Referenced by hash_desc(), hash_identify(), hash_redo(), and hashbulkdelete().

#define XLOG_HASH_VACUUM_ONE_PAGE   0xC0 /* remove dead tuples from index page */

Definition at line 47 of file hash_xlog.h.

Referenced by _hash_vacuum_one_page(), hash_desc(), hash_identify(), and hash_redo().

Typedef Documentation

Function Documentation

void hash_desc ( StringInfo  buf,
XLogReaderState record 
)

Definition at line 20 of file hashdesc.c.

References appendStringInfo(), xl_hash_add_ovfl_page::bmpage_found, xl_hash_add_ovfl_page::bmsize, xl_hash_init_bitmap_page::bmsize, xl_hash_delete::clear_dead_marking, xl_hash_init_meta_page::ffactor, xl_hash_split_allocate_page::flags, xl_hash_move_page_contents::is_prim_bucket_same_wrt, xl_hash_squeeze_page::is_prim_bucket_same_wrt, xl_hash_delete::is_primary_bucket_page, xl_hash_split_allocate_page::new_bucket, xl_hash_split_complete::new_bucket_flag, xl_hash_squeeze_page::nextblkno, xl_hash_update_meta_page::ntuples, xl_hash_vacuum_one_page::ntuples, xl_hash_move_page_contents::ntups, xl_hash_squeeze_page::ntups, xl_hash_init_meta_page::num_tuples, xl_hash_insert::offnum, xl_hash_split_complete::old_bucket_flag, xl_hash_squeeze_page::prevblkno, XLH_SPLIT_META_UPDATE_MASKS, XLH_SPLIT_META_UPDATE_SPLITPOINT, XLOG_HASH_ADD_OVFL_PAGE, XLOG_HASH_DELETE, XLOG_HASH_INIT_BITMAP_PAGE, XLOG_HASH_INIT_META_PAGE, XLOG_HASH_INSERT, XLOG_HASH_MOVE_PAGE_CONTENTS, XLOG_HASH_SPLIT_ALLOCATE_PAGE, XLOG_HASH_SPLIT_COMPLETE, XLOG_HASH_SQUEEZE_PAGE, XLOG_HASH_UPDATE_META_PAGE, XLOG_HASH_VACUUM_ONE_PAGE, XLogRecGetData, XLogRecGetInfo, and XLR_INFO_MASK.

21 {
22  char *rec = XLogRecGetData(record);
23  uint8 info = XLogRecGetInfo(record) & ~XLR_INFO_MASK;
24 
25  switch (info)
26  {
28  {
30 
31  appendStringInfo(buf, "num_tuples %g, fillfactor %d",
32  xlrec->num_tuples, xlrec->ffactor);
33  break;
34  }
36  {
38 
39  appendStringInfo(buf, "bmsize %d", xlrec->bmsize);
40  break;
41  }
42  case XLOG_HASH_INSERT:
43  {
44  xl_hash_insert *xlrec = (xl_hash_insert *) rec;
45 
46  appendStringInfo(buf, "off %u", xlrec->offnum);
47  break;
48  }
50  {
52 
53  appendStringInfo(buf, "bmsize %d, bmpage_found %c",
54  xlrec->bmsize, (xlrec->bmpage_found) ? 'T' : 'F');
55  break;
56  }
58  {
60 
61  appendStringInfo(buf, "new_bucket %u, meta_page_masks_updated %c, issplitpoint_changed %c",
62  xlrec->new_bucket,
63  (xlrec->flags & XLH_SPLIT_META_UPDATE_MASKS) ? 'T' : 'F',
64  (xlrec->flags & XLH_SPLIT_META_UPDATE_SPLITPOINT) ? 'T' : 'F');
65  break;
66  }
68  {
70 
71  appendStringInfo(buf, "old_bucket_flag %u, new_bucket_flag %u",
72  xlrec->old_bucket_flag, xlrec->new_bucket_flag);
73  break;
74  }
76  {
78 
79  appendStringInfo(buf, "ntups %d, is_primary %c",
80  xlrec->ntups,
81  xlrec->is_prim_bucket_same_wrt ? 'T' : 'F');
82  break;
83  }
85  {
87 
88  appendStringInfo(buf, "prevblkno %u, nextblkno %u, ntups %d, is_primary %c",
89  xlrec->prevblkno,
90  xlrec->nextblkno,
91  xlrec->ntups,
92  xlrec->is_prim_bucket_same_wrt ? 'T' : 'F');
93  break;
94  }
95  case XLOG_HASH_DELETE:
96  {
97  xl_hash_delete *xlrec = (xl_hash_delete *) rec;
98 
99  appendStringInfo(buf, "clear_dead_marking %c, is_primary %c",
100  xlrec->clear_dead_marking ? 'T' : 'F',
101  xlrec->is_primary_bucket_page ? 'T' : 'F');
102  break;
103  }
105  {
107 
108  appendStringInfo(buf, "ntuples %g",
109  xlrec->ntuples);
110  break;
111  }
113  {
115 
116  appendStringInfo(buf, "ntuples %d",
117  xlrec->ntuples);
118  break;
119  }
120  }
121 }
#define XLOG_HASH_INSERT
Definition: hash_xlog.h:29
#define XLH_SPLIT_META_UPDATE_SPLITPOINT
Definition: hash_xlog.h:53
#define XLOG_HASH_INIT_BITMAP_PAGE
Definition: hash_xlog.h:28
unsigned char uint8
Definition: c.h:266
bool clear_dead_marking
Definition: hash_xlog.h:200
BlockNumber prevblkno
Definition: hash_xlog.h:175
bool is_prim_bucket_same_wrt
Definition: hash_xlog.h:178
#define XLogRecGetData(decoder)
Definition: xlogreader.h:218
void appendStringInfo(StringInfo str, const char *fmt,...)
Definition: stringinfo.c:110
BlockNumber nextblkno
Definition: hash_xlog.h:176
#define XLOG_HASH_ADD_OVFL_PAGE
Definition: hash_xlog.h:30
bool is_primary_bucket_page
Definition: hash_xlog.h:202
#define XLOG_HASH_DELETE
Definition: hash_xlog.h:40
#define XLOG_HASH_INIT_META_PAGE
Definition: hash_xlog.h:27
#define XLogRecGetInfo(decoder)
Definition: xlogreader.h:214
#define XLOG_HASH_MOVE_PAGE_CONTENTS
Definition: hash_xlog.h:35
#define XLOG_HASH_VACUUM_ONE_PAGE
Definition: hash_xlog.h:47
#define XLR_INFO_MASK
Definition: xlogrecord.h:62
OffsetNumber offnum
Definition: hash_xlog.h:78
#define XLOG_HASH_SPLIT_COMPLETE
Definition: hash_xlog.h:33
#define XLOG_HASH_SPLIT_ALLOCATE_PAGE
Definition: hash_xlog.h:31
#define XLOG_HASH_SQUEEZE_PAGE
Definition: hash_xlog.h:37
#define XLH_SPLIT_META_UPDATE_MASKS
Definition: hash_xlog.h:52
#define XLOG_HASH_UPDATE_META_PAGE
Definition: hash_xlog.h:44
const char* hash_identify ( uint8  info)

Definition at line 124 of file hashdesc.c.

References NULL, XLOG_HASH_ADD_OVFL_PAGE, XLOG_HASH_DELETE, XLOG_HASH_INIT_BITMAP_PAGE, XLOG_HASH_INIT_META_PAGE, XLOG_HASH_INSERT, XLOG_HASH_MOVE_PAGE_CONTENTS, XLOG_HASH_SPLIT_ALLOCATE_PAGE, XLOG_HASH_SPLIT_CLEANUP, XLOG_HASH_SPLIT_COMPLETE, XLOG_HASH_SPLIT_PAGE, XLOG_HASH_SQUEEZE_PAGE, XLOG_HASH_UPDATE_META_PAGE, XLOG_HASH_VACUUM_ONE_PAGE, and XLR_INFO_MASK.

125 {
126  const char *id = NULL;
127 
128  switch (info & ~XLR_INFO_MASK)
129  {
131  id = "INIT_META_PAGE";
132  break;
134  id = "INIT_BITMAP_PAGE";
135  break;
136  case XLOG_HASH_INSERT:
137  id = "INSERT";
138  break;
140  id = "ADD_OVFL_PAGE";
141  break;
143  id = "SPLIT_ALLOCATE_PAGE";
144  break;
146  id = "SPLIT_PAGE";
147  break;
149  id = "SPLIT_COMPLETE";
150  break;
152  id = "MOVE_PAGE_CONTENTS";
153  break;
155  id = "SQUEEZE_PAGE";
156  break;
157  case XLOG_HASH_DELETE:
158  id = "DELETE";
159  break;
161  id = "SPLIT_CLEANUP";
162  break;
164  id = "UPDATE_META_PAGE";
165  break;
167  id = "VACUUM_ONE_PAGE";
168  }
169 
170  return id;
171 }
#define XLOG_HASH_INSERT
Definition: hash_xlog.h:29
#define XLOG_HASH_INIT_BITMAP_PAGE
Definition: hash_xlog.h:28
#define XLOG_HASH_SPLIT_CLEANUP
Definition: hash_xlog.h:41
#define XLOG_HASH_SPLIT_PAGE
Definition: hash_xlog.h:32
#define XLOG_HASH_ADD_OVFL_PAGE
Definition: hash_xlog.h:30
#define XLOG_HASH_DELETE
Definition: hash_xlog.h:40
#define XLOG_HASH_INIT_META_PAGE
Definition: hash_xlog.h:27
#define XLOG_HASH_MOVE_PAGE_CONTENTS
Definition: hash_xlog.h:35
#define XLOG_HASH_VACUUM_ONE_PAGE
Definition: hash_xlog.h:47
#define NULL
Definition: c.h:229
#define XLR_INFO_MASK
Definition: xlogrecord.h:62
#define XLOG_HASH_SPLIT_COMPLETE
Definition: hash_xlog.h:33
#define XLOG_HASH_SPLIT_ALLOCATE_PAGE
Definition: hash_xlog.h:31
#define XLOG_HASH_SQUEEZE_PAGE
Definition: hash_xlog.h:37
#define XLOG_HASH_UPDATE_META_PAGE
Definition: hash_xlog.h:44
void hash_mask ( char *  pagedata,
BlockNumber  blkno 
)

Definition at line 1224 of file hash_xlog.c.

References HashPageOpaqueData::hasho_flag, LH_BUCKET_PAGE, LH_OVERFLOW_PAGE, LH_PAGE_HAS_DEAD_TUPLES, LH_UNUSED_PAGE, mask_lp_flags(), mask_page_content(), mask_page_hint_bits(), mask_page_lsn(), mask_unused_space(), and PageGetSpecialPointer.

Referenced by tuplesort_begin_index_hash().

1225 {
1226  Page page = (Page) pagedata;
1227  HashPageOpaque opaque;
1228 
1229  mask_page_lsn(page);
1230 
1231  mask_page_hint_bits(page);
1232  mask_unused_space(page);
1233 
1234  opaque = (HashPageOpaque) PageGetSpecialPointer(page);
1235 
1236  if (opaque->hasho_flag & LH_UNUSED_PAGE)
1237  {
1238  /*
1239  * Mask everything on a UNUSED page.
1240  */
1241  mask_page_content(page);
1242  }
1243  else if ((opaque->hasho_flag & LH_BUCKET_PAGE) ||
1244  (opaque->hasho_flag & LH_OVERFLOW_PAGE))
1245  {
1246  /*
1247  * In hash bucket and overflow pages, it is possible to modify the
1248  * LP_FLAGS without emitting any WAL record. Hence, mask the line
1249  * pointer flags. See hashgettuple(), _hash_kill_items() for details.
1250  */
1251  mask_lp_flags(page);
1252  }
1253 
1254  /*
1255  * It is possible that the hint bit LH_PAGE_HAS_DEAD_TUPLES may remain
1256  * unlogged. So, mask it. See _hash_kill_items() for details.
1257  */
1258  opaque->hasho_flag &= ~LH_PAGE_HAS_DEAD_TUPLES;
1259 }
void mask_page_hint_bits(Page page)
Definition: bufmask.c:44
void mask_unused_space(Page page)
Definition: bufmask.c:69
#define LH_UNUSED_PAGE
Definition: hash.h:52
void mask_page_content(Page page)
Definition: bufmask.c:117
void mask_page_lsn(Page page)
Definition: bufmask.c:30
#define LH_OVERFLOW_PAGE
Definition: hash.h:53
#define LH_BUCKET_PAGE
Definition: hash.h:54
#define PageGetSpecialPointer(page)
Definition: bufpage.h:323
HashPageOpaqueData * HashPageOpaque
Definition: hash.h:85
uint16 hasho_flag
Definition: hash.h:81
void mask_lp_flags(Page page)
Definition: bufmask.c:93
#define LH_PAGE_HAS_DEAD_TUPLES
Definition: hash.h:60
Pointer Page
Definition: bufpage.h:74
void hash_redo ( XLogReaderState record)

Definition at line 1170 of file hash_xlog.c.

References elog, hash_xlog_add_ovfl_page(), hash_xlog_delete(), hash_xlog_init_bitmap_page(), hash_xlog_init_meta_page(), hash_xlog_insert(), hash_xlog_move_page_contents(), hash_xlog_split_allocate_page(), hash_xlog_split_cleanup(), hash_xlog_split_complete(), hash_xlog_split_page(), hash_xlog_squeeze_page(), hash_xlog_update_meta_page(), hash_xlog_vacuum_one_page(), PANIC, XLOG_HASH_ADD_OVFL_PAGE, XLOG_HASH_DELETE, XLOG_HASH_INIT_BITMAP_PAGE, XLOG_HASH_INIT_META_PAGE, XLOG_HASH_INSERT, XLOG_HASH_MOVE_PAGE_CONTENTS, XLOG_HASH_SPLIT_ALLOCATE_PAGE, XLOG_HASH_SPLIT_CLEANUP, XLOG_HASH_SPLIT_COMPLETE, XLOG_HASH_SPLIT_PAGE, XLOG_HASH_SQUEEZE_PAGE, XLOG_HASH_UPDATE_META_PAGE, XLOG_HASH_VACUUM_ONE_PAGE, XLogRecGetInfo, and XLR_INFO_MASK.

1171 {
1172  uint8 info = XLogRecGetInfo(record) & ~XLR_INFO_MASK;
1173 
1174  switch (info)
1175  {
1177  hash_xlog_init_meta_page(record);
1178  break;
1181  break;
1182  case XLOG_HASH_INSERT:
1183  hash_xlog_insert(record);
1184  break;
1186  hash_xlog_add_ovfl_page(record);
1187  break;
1190  break;
1191  case XLOG_HASH_SPLIT_PAGE:
1192  hash_xlog_split_page(record);
1193  break;
1195  hash_xlog_split_complete(record);
1196  break;
1199  break;
1201  hash_xlog_squeeze_page(record);
1202  break;
1203  case XLOG_HASH_DELETE:
1204  hash_xlog_delete(record);
1205  break;
1207  hash_xlog_split_cleanup(record);
1208  break;
1211  break;
1213  hash_xlog_vacuum_one_page(record);
1214  break;
1215  default:
1216  elog(PANIC, "hash_redo: unknown op code %u", info);
1217  }
1218 }
static void hash_xlog_insert(XLogReaderState *record)
Definition: hash_xlog.c:102
#define XLOG_HASH_INSERT
Definition: hash_xlog.h:29
static void hash_xlog_update_meta_page(XLogReaderState *record)
Definition: hash_xlog.c:914
static void hash_xlog_move_page_contents(XLogReaderState *record)
Definition: hash_xlog.c:480
static void hash_xlog_split_cleanup(XLogReaderState *record)
Definition: hash_xlog.c:889
static void hash_xlog_squeeze_page(XLogReaderState *record)
Definition: hash_xlog.c:606
#define XLOG_HASH_INIT_BITMAP_PAGE
Definition: hash_xlog.h:28
unsigned char uint8
Definition: c.h:266
#define XLOG_HASH_SPLIT_CLEANUP
Definition: hash_xlog.h:41
#define XLOG_HASH_SPLIT_PAGE
Definition: hash_xlog.h:32
#define PANIC
Definition: elog.h:53
static void hash_xlog_delete(XLogReaderState *record)
Definition: hash_xlog.c:811
#define XLOG_HASH_ADD_OVFL_PAGE
Definition: hash_xlog.h:30
static void hash_xlog_split_allocate_page(XLogReaderState *record)
Definition: hash_xlog.c:289
#define XLOG_HASH_DELETE
Definition: hash_xlog.h:40
static void hash_xlog_split_complete(XLogReaderState *record)
Definition: hash_xlog.c:421
static void hash_xlog_add_ovfl_page(XLogReaderState *record)
Definition: hash_xlog.c:150
#define XLOG_HASH_INIT_META_PAGE
Definition: hash_xlog.h:27
static void hash_xlog_init_bitmap_page(XLogReaderState *record)
Definition: hash_xlog.c:55
#define XLogRecGetInfo(decoder)
Definition: xlogreader.h:214
#define XLOG_HASH_MOVE_PAGE_CONTENTS
Definition: hash_xlog.h:35
static void hash_xlog_init_meta_page(XLogReaderState *record)
Definition: hash_xlog.c:31
#define XLOG_HASH_VACUUM_ONE_PAGE
Definition: hash_xlog.h:47
#define XLR_INFO_MASK
Definition: xlogrecord.h:62
static void hash_xlog_split_page(XLogReaderState *record)
Definition: hash_xlog.c:407
#define XLOG_HASH_SPLIT_COMPLETE
Definition: hash_xlog.h:33
#define XLOG_HASH_SPLIT_ALLOCATE_PAGE
Definition: hash_xlog.h:31
#define XLOG_HASH_SQUEEZE_PAGE
Definition: hash_xlog.h:37
#define elog
Definition: elog.h:219
#define XLOG_HASH_UPDATE_META_PAGE
Definition: hash_xlog.h:44
static void hash_xlog_vacuum_one_page(XLogReaderState *record)
Definition: hash_xlog.c:1090