summaryrefslogtreecommitdiff
path: root/src/bin/initdb
diff options
context:
space:
mode:
authorTom Lane2015-05-29 19:11:36 +0000
committerTom Lane2015-05-29 19:11:36 +0000
commit57e1138bcc621ffeb8b1f1379ac4016a5c34d43e (patch)
tree7d86e057ac6a2fdcba30ea1b04ef599c568bebf4 /src/bin/initdb
parent1c8c656b3c217aaffc503ad703dcc60cdabe7445 (diff)
Remove special cases for ETXTBSY from new fsync'ing logic.
The argument that this is a sufficiently-expected case to be silently ignored seems pretty thin. Andres had brought it up back when we were still considering that most fsync failures should be hard errors, and it probably would be legit not to fail hard for ETXTBSY --- but the same is true for EROFS and other cases, which is why we gave up on hard failures. ETXTBSY is surely not a normal case, so logging the failure seems fine from here.
Diffstat (limited to 'src/bin/initdb')
-rw-r--r--src/bin/initdb/initdb.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index f0d66fa12e3..6a73e9688bc 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -619,12 +619,6 @@ pre_sync_fname(const char *fname, bool isdir)
{
if (errno == EACCES || (isdir && errno == EISDIR))
return;
-
-#ifdef ETXTBSY
- if (errno == ETXTBSY)
- return;
-#endif
-
fprintf(stderr, _("%s: could not open file \"%s\": %s\n"),
progname, fname, strerror(errno));
return;
@@ -684,12 +678,6 @@ fsync_fname_ext(const char *fname, bool isdir)
{
if (errno == EACCES || (isdir && errno == EISDIR))
return;
-
-#ifdef ETXTBSY
- if (errno == ETXTBSY)
- return;
-#endif
-
fprintf(stderr, _("%s: could not open file \"%s\": %s\n"),
progname, fname, strerror(errno));
return;