aboutsummaryrefslogtreecommitdiff
path: root/src/backend/bootstrap/bootstrap.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2003-03-06 00:04:27 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2003-03-06 00:04:27 +0000
commit4b6c198a6af427fd3531b09cd6fa15e715de6aa5 (patch)
tree5eed566a56b5daff030ae202427cce369227ee4f /src/backend/bootstrap/bootstrap.c
parent21591967bc19c749a100fb97ec82f6086ce5cc3c (diff)
downloadpostgresql-4b6c198a6af427fd3531b09cd6fa15e715de6aa5.tar.gz
postgresql-4b6c198a6af427fd3531b09cd6fa15e715de6aa5.zip
Add code to dump contents of free space map into $PGDATA/global/pg_fsm.cache
at database shutdown, and then load it again at database startup. This preserves our hard-won knowledge of free space across restarts (given an orderly shutdown, that is).
Diffstat (limited to 'src/backend/bootstrap/bootstrap.c')
-rw-r--r--src/backend/bootstrap/bootstrap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c
index cf0c1de7c62..f120192bc88 100644
--- a/src/backend/bootstrap/bootstrap.c
+++ b/src/backend/bootstrap/bootstrap.c
@@ -8,7 +8,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.147 2002/12/15 16:17:38 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.148 2003/03/06 00:04:27 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -34,6 +34,7 @@
#include "executor/executor.h"
#include "libpq/pqsignal.h"
#include "miscadmin.h"
+#include "storage/freespace.h"
#include "storage/ipc.h"
#include "storage/proc.h"
#include "tcop/tcopprot.h"
@@ -398,10 +399,12 @@ BootstrapMain(int argc, char *argv[])
case BS_XLOG_STARTUP:
StartupXLOG();
+ LoadFreeSpaceMap();
proc_exit(0); /* done */
case BS_XLOG_SHUTDOWN:
ShutdownXLOG();
+ DumpFreeSpaceMap();
proc_exit(0); /* done */
default: