mirror of
https://github.com/postgres/postgres.git
synced 2025-11-18 02:02:55 +03:00
Tablespaces. Alternate database locations are dead, long live tablespaces.
There are various things left to do: contrib dbsize and oid2name modules need work, and so does the documentation. Also someone should think about COMMENT ON TABLESPACE and maybe RENAME TABLESPACE. Also initlocation is dead, it just doesn't know it yet. Gavin Sherry and Tom Lane.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/storage/freespace/freespace.c,v 1.31 2004/06/05 19:48:08 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/storage/freespace/freespace.c,v 1.32 2004/06/18 06:13:34 tgl Exp $
|
||||
*
|
||||
*
|
||||
* NOTES:
|
||||
@@ -658,9 +658,6 @@ FreeSpaceMapForgetRel(RelFileNode *rel)
|
||||
*
|
||||
* This is called during DROP DATABASE. As above, might as well reclaim
|
||||
* map space sooner instead of later.
|
||||
*
|
||||
* XXX when we implement tablespaces, target Oid will need to be tablespace
|
||||
* ID not database ID.
|
||||
*/
|
||||
void
|
||||
FreeSpaceMapForgetDatabase(Oid dbid)
|
||||
@@ -672,7 +669,7 @@ FreeSpaceMapForgetDatabase(Oid dbid)
|
||||
for (fsmrel = FreeSpaceMap->usageList; fsmrel; fsmrel = nextrel)
|
||||
{
|
||||
nextrel = fsmrel->nextUsage; /* in case we delete it */
|
||||
if (fsmrel->key.tblNode == dbid)
|
||||
if (fsmrel->key.dbNode == dbid)
|
||||
delete_fsm_rel(fsmrel);
|
||||
}
|
||||
LWLockRelease(FreeSpaceLock);
|
||||
@@ -1847,8 +1844,9 @@ DumpFreeSpace(void)
|
||||
for (fsmrel = FreeSpaceMap->usageList; fsmrel; fsmrel = fsmrel->nextUsage)
|
||||
{
|
||||
relNum++;
|
||||
fprintf(stderr, "Map %d: rel %u/%u isIndex %d avgRequest %u lastPageCount %d nextPage %d\nMap= ",
|
||||
relNum, fsmrel->key.tblNode, fsmrel->key.relNode,
|
||||
fprintf(stderr, "Map %d: rel %u/%u/%u isIndex %d avgRequest %u lastPageCount %d nextPage %d\nMap= ",
|
||||
relNum,
|
||||
fsmrel->key.spcNode, fsmrel->key.dbNode, fsmrel->key.relNode,
|
||||
(int) fsmrel->isIndex, fsmrel->avgRequest,
|
||||
fsmrel->lastPageCount, fsmrel->nextPage);
|
||||
if (fsmrel->isIndex)
|
||||
|
||||
Reference in New Issue
Block a user