mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
First non-stub implementation of shared free space map. It's not super
useful as yet, since its primary source of information is (full) VACUUM, which makes a concerted effort to get rid of free space before telling the map about it ... next stop is concurrent VACUUM ...
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.51 2001/06/29 21:08:24 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.52 2001/07/02 20:50:46 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -469,11 +469,13 @@ smgrtruncate(int16 which, Relation reln, BlockNumber nblocks)
|
||||
if (smgrsw[which].smgr_truncate)
|
||||
{
|
||||
/*
|
||||
* Tell the free space map to forget this relation, so that it
|
||||
* stops caching info about the deleted blocks. XXX perhaps
|
||||
* tell it to forget only info about blocks beyond nblocks?
|
||||
* Tell the free space map to forget anything it may have stored
|
||||
* for the about-to-be-deleted blocks. We want to be sure it won't
|
||||
* return bogus block numbers later on.
|
||||
*/
|
||||
FreeSpaceMapForgetRel(&reln->rd_node);
|
||||
MultiRecordFreeSpace(&reln->rd_node,
|
||||
nblocks, MaxBlockNumber,
|
||||
0, NULL, NULL);
|
||||
|
||||
newblks = (*(smgrsw[which].smgr_truncate)) (reln, nblocks);
|
||||
if (newblks == InvalidBlockNumber)
|
||||
|
Reference in New Issue
Block a user