From 30659d43eb73272e20f2eb1d785a07ba3b553ed8 Mon Sep 17 00:00:00 2001 From: "Vadim B. Mikheev" Date: Mon, 27 Sep 1999 15:48:12 +0000 Subject: Transaction log manager core code. It doesn't work currently but also don't break anything -:) --- src/backend/storage/file/fd.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/backend/storage/file/fd.c') 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() { -- cgit v1.2.3