diff options
Diffstat (limited to 'src/backend/storage/file/fd.c')
-rw-r--r-- | src/backend/storage/file/fd.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c index c279528974c..4cdb638819e 100644 --- a/src/backend/storage/file/fd.c +++ b/src/backend/storage/file/fd.c @@ -6,7 +6,7 @@ * Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Id: fd.c,v 1.47 1999/07/17 20:17:42 momjian Exp $ + * $Id: fd.c,v 1.48 1999/09/27 15:47:49 vadim Exp $ * * NOTES: * @@ -49,6 +49,7 @@ #include "miscadmin.h" #include "storage/fd.h" +bool ReleaseDataFile(void); /* * Problem: Postgres does a system(ld...) to do dynamic loading. * This will open several extra files in addition to those used by @@ -410,6 +411,19 @@ ReleaseLruFile() LruDelete(VfdCache[0].lruMoreRecently); } +bool +ReleaseDataFile() +{ + DO_DB(elog(DEBUG, "ReleaseDataFile. Opened %d", nfile)); + + if (nfile <= 0) + return(false); + Assert(VfdCache[0].lruMoreRecently != 0); + LruDelete(VfdCache[0].lruMoreRecently); + + return(true); +} + static File AllocateVfd() { |