mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
If we fail to rename pg_internal.init into place, delete the useless
temporary file. This seems to be a known failure mode under Cygwin, so we might as well expend the extra line of code to be tidy.
This commit is contained in:
parent
aa00e6134e
commit
d66b10833f
9
src/backend/utils/cache/relcache.c
vendored
9
src/backend/utils/cache/relcache.c
vendored
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.149 2001/11/05 17:46:30 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.150 2002/01/15 22:33:20 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -2978,5 +2978,12 @@ write_irels(void)
|
||||
* previously-existing init file.
|
||||
*/
|
||||
if (rename(tempfilename, finalfilename) < 0)
|
||||
{
|
||||
elog(NOTICE, "Cannot rename init file %s to %s: %m\n\tContinuing anyway, but there's something wrong.", tempfilename, finalfilename);
|
||||
/*
|
||||
* If we fail, try to clean up the useless temp file; don't bother
|
||||
* to complain if this fails too.
|
||||
*/
|
||||
unlink(tempfilename);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user