diff options
| author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2008-11-19 10:34:52 +0000 |
|---|---|---|
| committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2008-11-19 10:34:52 +0000 |
| commit | 3396000684b41e7e9467d1abc67152b39e697035 (patch) | |
| tree | c8edf238f89cd7b0b1562b919f2addebc67eb54e /src/include/storage/freespace.h | |
| parent | 26e6c896c946bc1a9e9f608b2c7463be1e8c6291 (diff) | |
| download | postgresql-3396000684b41e7e9467d1abc67152b39e697035.tar.gz | |
Rethink the way FSM truncation works. Instead of WAL-logging FSM
truncations in FSM code, call FreeSpaceMapTruncateRel from smgr_redo. To
make that cleaner from modularity point of view, move the WAL-logging one
level up to RelationTruncate, and move RelationTruncate and all the
related WAL-logging to new src/backend/catalog/storage.c file. Introduce
new RelationCreateStorage and RelationDropStorage functions that are used
instead of calling smgrcreate/smgrscheduleunlink directly. Move the
pending rel deletion stuff from smgrcreate/smgrscheduleunlink to the new
functions. This leaves smgr.c as a thin wrapper around md.c; all the
transactional stuff is now in storage.c.
This will make it easier to add new forks with similar truncation logic,
like the visibility map.
Diffstat (limited to 'src/include/storage/freespace.h')
| -rw-r--r-- | src/include/storage/freespace.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/include/storage/freespace.h b/src/include/storage/freespace.h index 858be59528..e9490933db 100644 --- a/src/include/storage/freespace.h +++ b/src/include/storage/freespace.h @@ -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.30 2008/10/31 19:40:27 heikki Exp $ + * $PostgreSQL: pgsql/src/include/storage/freespace.h,v 1.31 2008/11/19 10:34:52 heikki Exp $ * *------------------------------------------------------------------------- */ @@ -33,8 +33,4 @@ extern void XLogRecordPageWithFreeSpace(RelFileNode rnode, BlockNumber heapBlk, extern void FreeSpaceMapTruncateRel(Relation rel, BlockNumber nblocks); extern void FreeSpaceMapVacuum(Relation rel); -/* WAL prototypes */ -extern void fsm_desc(StringInfo buf, uint8 xl_info, char *rec); -extern void fsm_redo(XLogRecPtr lsn, XLogRecord *record); - #endif /* FREESPACE_H */ |
