aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>1999-05-09 00:52:08 +0000
committerTom Lane <tgl@sss.pgh.pa.us>1999-05-09 00:52:08 +0000
commitc1167a08cacb86c0e6c22e3db81233143ceba5b8 (patch)
treeccf27d533b8847d133ba1cbd8ffaac5a47cf0ab5 /src/backend/access
parentb0f1880a8eb740d9895faddc28b6b9362df9fcba (diff)
downloadpostgresql-c1167a08cacb86c0e6c22e3db81233143ceba5b8.tar.gz
postgresql-c1167a08cacb86c0e6c22e3db81233143ceba5b8.zip
Add 'temporary file' facility to fd.c, and arrange for temp
files to be closed automatically at transaction abort or commit, should they still be open. Also close any still-open stdio files allocated with AllocateFile at abort/commit. This should eliminate problems with leakage of file descriptors after an error. Also, put in some primitive buffered-IO support so that psort.c can use virtual files without severe performance penalties.
Diffstat (limited to 'src/backend/access')
-rw-r--r--src/backend/access/transam/xact.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 79e09a16ac7..60341ad1b74 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.33 1999/03/28 20:31:59 vadim Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.34 1999/05/09 00:52:08 tgl Exp $
*
* NOTES
* Transaction aborts can now occur two ways:
@@ -148,6 +148,7 @@
#include <utils/inval.h>
#include <utils/portal.h>
#include <access/transam.h>
+#include <storage/fd.h>
#include <storage/proc.h>
#include <utils/mcxt.h>
#include <catalog/heap.h>
@@ -920,6 +921,7 @@ CommitTransaction()
AtCommit_Cache();
AtCommit_Locks();
AtCommit_Memory();
+ AtEOXact_Files();
/* ----------------
* done with commit processing, set current transaction
@@ -990,6 +992,7 @@ AbortTransaction()
AtAbort_Cache();
AtAbort_Locks();
AtAbort_Memory();
+ AtEOXact_Files();
/* ----------------
* done with abort processing, set current transaction