mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
Reduce memory consumption during VACUUM of large relations, by using
FSMPageData (6 bytes) instead of PageFreeSpaceInfo (8 or 16 bytes) for the temporary array of page-free-space information. Itagaki Takahiro
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/storage/freespace.h,v 1.27 2008/01/01 19:45:59 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/include/storage/freespace.h,v 1.28 2008/03/10 02:04:10 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -18,16 +18,6 @@
|
||||
#include "storage/itemptr.h"
|
||||
|
||||
|
||||
/*
|
||||
* exported types
|
||||
*/
|
||||
typedef struct PageFreeSpaceInfo
|
||||
{
|
||||
BlockNumber blkno; /* which page in relation */
|
||||
Size avail; /* space available on this page */
|
||||
} PageFreeSpaceInfo;
|
||||
|
||||
|
||||
/* Initial value for average-request moving average */
|
||||
#define INITIAL_AVERAGE ((Size) (BLCKSZ / 32))
|
||||
|
||||
@@ -144,7 +134,7 @@ extern Size GetAvgFSMRequestSize(RelFileNode *rel);
|
||||
extern void RecordRelationFreeSpace(RelFileNode *rel,
|
||||
BlockNumber interestingPages,
|
||||
int nPages,
|
||||
PageFreeSpaceInfo *pageSpaces);
|
||||
FSMPageData *pageSpaces);
|
||||
|
||||
extern BlockNumber GetFreeIndexPage(RelFileNode *rel);
|
||||
extern void RecordIndexFreeSpace(RelFileNode *rel,
|
||||
|
||||
Reference in New Issue
Block a user