mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
Make btree index structure adjustments and WAL logging changes needed to
support btree compaction, as per proposal of a few days ago. btree index pages no longer store parent links, instead they have a level indicator (counting up from zero for leaf pages). The FixBTree recovery logic is removed, and replaced by code that detects missing parent-level insertions during WAL replay. Also, generate appropriate WAL entries when updating btree metapage and when building a btree index from scratch. I believe btree indexes are now completely WAL-legal for the first time. initdb forced due to index and WAL changes.
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Resource managers definition
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/rmgr.c,v 1.9 2001/08/25 18:52:41 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/rmgr.c,v 1.10 2003/02/21 00:06:22 tgl Exp $
|
||||
*/
|
||||
#include "postgres.h"
|
||||
|
||||
@ -19,21 +19,22 @@
|
||||
#include "commands/sequence.h"
|
||||
|
||||
|
||||
RmgrData RmgrTable[] = {
|
||||
{"XLOG", xlog_redo, xlog_undo, xlog_desc},
|
||||
{"Transaction", xact_redo, xact_undo, xact_desc},
|
||||
{"Storage", smgr_redo, smgr_undo, smgr_desc},
|
||||
{"CLOG", clog_redo, clog_undo, clog_desc},
|
||||
{"Reserved 4", NULL, NULL, NULL},
|
||||
{"Reserved 5", NULL, NULL, NULL},
|
||||
{"Reserved 6", NULL, NULL, NULL},
|
||||
{"Reserved 7", NULL, NULL, NULL},
|
||||
{"Reserved 8", NULL, NULL, NULL},
|
||||
{"Reserved 9", NULL, NULL, NULL},
|
||||
{"Heap", heap_redo, heap_undo, heap_desc},
|
||||
{"Btree", btree_redo, btree_undo, btree_desc},
|
||||
{"Hash", hash_redo, hash_undo, hash_desc},
|
||||
{"Rtree", rtree_redo, rtree_undo, rtree_desc},
|
||||
{"Gist", gist_redo, gist_undo, gist_desc},
|
||||
{"Sequence", seq_redo, seq_undo, seq_desc}
|
||||
RmgrData RmgrTable[RM_MAX_ID+1] = {
|
||||
{"XLOG", xlog_redo, xlog_undo, xlog_desc, NULL, NULL},
|
||||
{"Transaction", xact_redo, xact_undo, xact_desc, NULL, NULL},
|
||||
{"Storage", smgr_redo, smgr_undo, smgr_desc, NULL, NULL},
|
||||
{"CLOG", clog_redo, clog_undo, clog_desc, NULL, NULL},
|
||||
{"Reserved 4", NULL, NULL, NULL, NULL, NULL},
|
||||
{"Reserved 5", NULL, NULL, NULL, NULL, NULL},
|
||||
{"Reserved 6", NULL, NULL, NULL, NULL, NULL},
|
||||
{"Reserved 7", NULL, NULL, NULL, NULL, NULL},
|
||||
{"Reserved 8", NULL, NULL, NULL, NULL, NULL},
|
||||
{"Reserved 9", NULL, NULL, NULL, NULL, NULL},
|
||||
{"Heap", heap_redo, heap_undo, heap_desc, NULL, NULL},
|
||||
{"Btree", btree_redo, btree_undo, btree_desc,
|
||||
btree_xlog_startup, btree_xlog_cleanup},
|
||||
{"Hash", hash_redo, hash_undo, hash_desc, NULL, NULL},
|
||||
{"Rtree", rtree_redo, rtree_undo, rtree_desc, NULL, NULL},
|
||||
{"Gist", gist_redo, gist_undo, gist_desc, NULL, NULL},
|
||||
{"Sequence", seq_redo, seq_undo, seq_desc, NULL, NULL}
|
||||
};
|
||||
|
Reference in New Issue
Block a user