7
7
* Portions Copyright (c) 1994, Regents of the University of California
8
8
*
9
9
* IDENTIFICATION
10
- * $PostgreSQL: pgsql/src/backend/storage/file/fd.c,v 1.139 2007/06/07 19:19:57 tgl Exp $
10
+ * $PostgreSQL: pgsql/src/backend/storage/file/fd.c,v 1.140 2007/07/26 15:15:18 tgl Exp $
11
11
*
12
12
* NOTES:
13
13
*
@@ -549,8 +549,7 @@ LruDelete(File file)
549
549
550
550
/* close the file */
551
551
if (close (vfdP -> fd ))
552
- elog (ERROR , "failed to close \"%s\": %m" ,
553
- vfdP -> fileName );
552
+ elog (ERROR , "could not close file \"%s\": %m" , vfdP -> fileName );
554
553
555
554
-- nfile ;
556
555
vfdP -> fd = VFD_CLOSED ;
@@ -985,8 +984,7 @@ FileClose(File file)
985
984
986
985
/* close the file */
987
986
if (close (vfdP -> fd ))
988
- elog (ERROR , "failed to close \"%s\": %m" ,
989
- vfdP -> fileName );
987
+ elog (ERROR , "could not close file \"%s\": %m" , vfdP -> fileName );
990
988
991
989
-- nfile ;
992
990
vfdP -> fd = VFD_CLOSED ;
@@ -1005,15 +1003,15 @@ FileClose(File file)
1005
1003
{
1006
1004
if (filestats .st_size >= log_temp_files )
1007
1005
ereport (LOG ,
1008
- (errmsg ("temp file: path \"%s\" size %lu" ,
1009
- vfdP -> fileName , (unsigned long )filestats .st_size )));
1006
+ (errmsg ("temp file: path \"%s\" size %lu" ,
1007
+ vfdP -> fileName ,
1008
+ (unsigned long ) filestats .st_size )));
1010
1009
}
1011
1010
else
1012
- elog (LOG , "Could not stat \"%s\": %m" , vfdP -> fileName );
1011
+ elog (LOG , "could not stat file \"%s\": %m" , vfdP -> fileName );
1013
1012
}
1014
1013
if (unlink (vfdP -> fileName ))
1015
- elog (LOG , "failed to unlink \"%s\": %m" ,
1016
- vfdP -> fileName );
1014
+ elog (LOG , "could not unlink file \"%s\": %m" , vfdP -> fileName );
1017
1015
}
1018
1016
1019
1017
/*
@@ -1022,23 +1020,6 @@ FileClose(File file)
1022
1020
FreeVfd (file );
1023
1021
}
1024
1022
1025
- /*
1026
- * close a file and forcibly delete the underlying Unix file
1027
- */
1028
- void
1029
- FileUnlink (File file )
1030
- {
1031
- Assert (FileIsValid (file ));
1032
-
1033
- DO_DB (elog (LOG , "FileUnlink: %d (%s)" ,
1034
- file , VfdCache [file ].fileName ));
1035
-
1036
- /* force FileClose to delete it */
1037
- VfdCache [file ].fdstate |= FD_TEMPORARY ;
1038
-
1039
- FileClose (file );
1040
- }
1041
-
1042
1023
int
1043
1024
FileRead (File file , char * buffer , int amount )
1044
1025
{
0 commit comments