mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Remove the 'slow' path for btree index build, which built the btree
incrementally by successive inserts rather than by sorting the data. We were only using the slow path during bootstrap, apparently because when first written it failed during bootstrap --- but it works fine now AFAICT. Removing it saves a hundred or so lines of code and produces noticeably (~10%) smaller initial states of the system catalog indexes. While that won't make much difference for heavily-modified catalogs, for the more static ones there may be a useful long-term performance improvement.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/access/nbtree.h,v 1.94 2006/03/31 23:32:06 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/access/nbtree.h,v 1.95 2006/04/01 03:03:37 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -176,7 +176,6 @@ typedef struct BTMetaPageData
|
||||
#define XLOG_BTREE_DELETE_PAGE 0x80 /* delete an entire page */
|
||||
#define XLOG_BTREE_DELETE_PAGE_META 0x90 /* same, plus update metapage */
|
||||
#define XLOG_BTREE_NEWROOT 0xA0 /* new root page */
|
||||
#define XLOG_BTREE_NEWMETA 0xB0 /* update metadata page */
|
||||
|
||||
/*
|
||||
* All that we need to find changed index tuple
|
||||
@ -291,18 +290,6 @@ typedef struct xl_btree_newroot
|
||||
|
||||
#define SizeOfBtreeNewroot (offsetof(xl_btree_newroot, level) + sizeof(uint32))
|
||||
|
||||
/*
|
||||
* New metapage log record. This is not issued during routine operations;
|
||||
* it's only used when initializing an empty index.
|
||||
*/
|
||||
typedef struct xl_btree_newmeta
|
||||
{
|
||||
RelFileNode node;
|
||||
xl_btree_metadata meta;
|
||||
} xl_btree_newmeta;
|
||||
|
||||
#define SizeOfBtreeNewmeta (sizeof(xl_btree_newmeta))
|
||||
|
||||
|
||||
/*
|
||||
* Operator strategy numbers for B-tree have been moved to access/skey.h,
|
||||
@ -410,7 +397,6 @@ extern void _bt_insert_parent(Relation rel, Buffer buf, Buffer rbuf,
|
||||
/*
|
||||
* prototypes for functions in nbtpage.c
|
||||
*/
|
||||
extern void _bt_metapinit(Relation rel);
|
||||
extern void _bt_initmetapage(Page page, BlockNumber rootbknum, uint32 level);
|
||||
extern Buffer _bt_getroot(Relation rel, int access);
|
||||
extern Buffer _bt_gettrueroot(Relation rel);
|
||||
|
Reference in New Issue
Block a user