mirror of
https://github.com/postgres/postgres.git
synced 2025-08-31 17:02:12 +03:00
Improve handling of prune/no-prune decisions by storing a page's oldest
unpruned XMAX in its header. At the cost of 4 bytes per page, this keeps us from performing heap_page_prune when there's no chance of pruning anything. Seems to be necessary per Heikki's preliminary performance testing.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/storage/page/bufpage.c,v 1.74 2007/09/20 17:56:31 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/storage/page/bufpage.c,v 1.75 2007/09/21 21:25:42 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -40,11 +40,12 @@ PageInit(Page page, Size pageSize, Size specialSize)
|
||||
/* Make sure all fields of page are zero, as well as unused space */
|
||||
MemSet(p, 0, pageSize);
|
||||
|
||||
/* p->pd_flags = 0; done by above MemSet */
|
||||
/* p->pd_flags = 0; done by above MemSet */
|
||||
p->pd_lower = SizeOfPageHeaderData;
|
||||
p->pd_upper = pageSize - specialSize;
|
||||
p->pd_special = pageSize - specialSize;
|
||||
PageSetPageSizeAndVersion(page, pageSize, PG_PAGE_LAYOUT_VERSION);
|
||||
/* p->pd_prune_xid = InvalidTransactionId; done by above MemSet */
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user