Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
8bbf227a
Commit
8bbf227a
authored
Aug 10, 2005
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document why Win32 loops over rename/unlink are necessary.
parent
e38c920d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
src/port/dirmod.c
src/port/dirmod.c
+11
-3
No files found.
src/port/dirmod.c
View file @
8bbf227a
...
...
@@ -10,7 +10,7 @@
* Win32 (NT, Win2k, XP). replace() doesn't work on Win95/98/Me.
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/port/dirmod.c,v 1.3
8 2005/08/02 15:14:47 tgl
Exp $
* $PostgreSQL: pgsql/src/port/dirmod.c,v 1.3
9 2005/08/10 19:52:37 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -118,7 +118,11 @@ pgrename(const char *from, const char *to)
{
int
loops
=
0
;
/* Is this loop even necessary now that we have win32_open()? */
/*
* We need these loops because even though PostgreSQL uses flags
* that allow rename while the file is open, other applications
* might have these files open without those flags.
*/
#if defined(WIN32) && !defined(__CYGWIN__)
while
(
!
MoveFileEx
(
from
,
to
,
MOVEFILE_REPLACE_EXISTING
))
#endif
...
...
@@ -164,7 +168,11 @@ pgunlink(const char *path)
{
int
loops
=
0
;
/* Is this loop even necessary now that we have win32_open()? */
/*
* We need these loops because even though PostgreSQL uses flags
* that allow unlink while the file is open, other applications
* might have these files open without those flags.
*/
while
(
unlink
(
path
))
{
if
(
errno
!=
EACCES
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment