1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-12 05:01:15 +03:00

Major patch to speed up backend startup after profiling analysis.

This commit is contained in:
Bruce Momjian
1997-08-24 23:08:01 +00:00
parent 281ba3f40d
commit c4cb617504
9 changed files with 122 additions and 198 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/page/bufpage.c,v 1.7 1997/08/19 21:33:33 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/page/bufpage.c,v 1.8 1997/08/24 23:07:30 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -31,43 +31,6 @@ static void PageIndexTupleDeleteAdjustLinePointers(PageHeader phdr,
static bool PageManagerShuffle = true; /* default is shuffle mode */
/* ----------------------------------------------------------------
* Buffer support functions
* ----------------------------------------------------------------
*/
/*
* BufferGetPageSize --
* Returns the page size within a buffer.
*
* Notes:
* Assumes buffer is valid.
*
* The buffer can be a raw disk block and need not contain a valid
* (formatted) disk page.
*/
Size
BufferGetPageSize(Buffer buffer)
{
Size pageSize;
Assert(BufferIsValid(buffer));
pageSize = BLCKSZ; /* XXX dig out of buffer descriptor */
Assert(PageSizeIsValid(pageSize));
return (pageSize);
}
/*
* BufferGetPage --
* Returns the page associated with a buffer.
*/
Page
BufferGetPage(Buffer buffer)
{
return (Page) BufferGetBlock(buffer);
}
/* ----------------------------------------------------------------
* Page support functions
* ----------------------------------------------------------------
@@ -94,31 +57,6 @@ PageInit(Page page, Size pageSize, Size specialSize)
PageSetPageSize(page, pageSize);
}
/*
* PageGetItem --
* Retrieves an item on the given page.
*
* Note:
* This does change the status of any of the resources passed.
* The semantics may change in the future.
*/
Item
PageGetItem(Page page, ItemId itemId)
{
Item item;
Assert(PageIsValid(page));
/* Assert(itemId->lp_flags & LP_USED); */
if(!(itemId->lp_flags & LP_USED)) {
elog(NOTICE, "LP_USED assertion failed. dumping core.");
abort();
}
item = (Item)(((char *)page) + itemId->lp_off);
return (item);
}
/*
* PageAddItem --
* Adds item to the given page.