Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc1167a0

Browse files
committed
Add 'temporary file' facility to fd.c, and arrange for temp
files to be closed automatically at transaction abort or commit, shouldthey still be open. Also close any still-open stdio files allocated withAllocateFile at abort/commit. This should eliminate problems with leakageof file descriptors after an error. Also, put in some primitive buffered-IOsupport so that psort.c can use virtual files without severe performancepenalties.
1 parentb0f1880 commitc1167a0

File tree

3 files changed

+529
-195
lines changed

3 files changed

+529
-195
lines changed

‎src/backend/access/transam/xact.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.33 1999/03/28 20:31:59 vadim Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.34 1999/05/09 00:52:08 tgl Exp $
1111
*
1212
* NOTES
1313
*Transaction aborts can now occur two ways:
@@ -148,6 +148,7 @@
148148
#include<utils/inval.h>
149149
#include<utils/portal.h>
150150
#include<access/transam.h>
151+
#include<storage/fd.h>
151152
#include<storage/proc.h>
152153
#include<utils/mcxt.h>
153154
#include<catalog/heap.h>
@@ -920,6 +921,7 @@ CommitTransaction()
920921
AtCommit_Cache();
921922
AtCommit_Locks();
922923
AtCommit_Memory();
924+
AtEOXact_Files();
923925

924926
/* ----------------
925927
*done with commit processing, set current transaction
@@ -990,6 +992,7 @@ AbortTransaction()
990992
AtAbort_Cache();
991993
AtAbort_Locks();
992994
AtAbort_Memory();
995+
AtEOXact_Files();
993996

994997
/* ----------------
995998
*done with abort processing, set current transaction

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp