summaryrefslogtreecommitdiff
path: root/src/backend/postmaster
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/postmaster')
-rw-r--r--src/backend/postmaster/fork_process.c7
-rw-r--r--src/backend/postmaster/shell_archive.c1
2 files changed, 2 insertions, 6 deletions
diff --git a/src/backend/postmaster/fork_process.c b/src/backend/postmaster/fork_process.c
index c75be03d2c3..ec677614870 100644
--- a/src/backend/postmaster/fork_process.c
+++ b/src/backend/postmaster/fork_process.c
@@ -37,13 +37,8 @@ fork_process(void)
/*
* Flush stdio channels just before fork, to avoid double-output problems.
- * Ideally we'd use fflush(NULL) here, but there are still a few non-ANSI
- * stdio libraries out there (like SunOS 4.1.x) that coredump if we do.
- * Presently stdout and stderr are the only stdio output channels used by
- * the postmaster, so fflush'ing them should be sufficient.
*/
- fflush(stdout);
- fflush(stderr);
+ fflush(NULL);
#ifdef LINUX_PROFILE
diff --git a/src/backend/postmaster/shell_archive.c b/src/backend/postmaster/shell_archive.c
index 19e240c2053..8a54d02e7bb 100644
--- a/src/backend/postmaster/shell_archive.c
+++ b/src/backend/postmaster/shell_archive.c
@@ -99,6 +99,7 @@ shell_archive_file(const char *file, const char *path)
(errmsg_internal("executing archive command \"%s\"",
xlogarchcmd)));
+ fflush(NULL);
pgstat_report_wait_start(WAIT_EVENT_ARCHIVE_COMMAND);
rc = system(xlogarchcmd);
pgstat_report_wait_end();