diff --git a/doc/xml/release.xml b/doc/xml/release.xml index 2489160d7..b548a15f1 100644 --- a/doc/xml/release.xml +++ b/doc/xml/release.xml @@ -33,6 +33,14 @@ + + + + + +

Open log file after async process is completely separated from the main process to prevent the main process from also logging to the file.

+
+

Dynamically generate list of files for C library build.

diff --git a/lib/pgBackRest/Archive/Push/Async.pm b/lib/pgBackRest/Archive/Push/Async.pm index 48da14c69..23fc769d6 100644 --- a/lib/pgBackRest/Archive/Push/Async.pm +++ b/lib/pgBackRest/Archive/Push/Async.pm @@ -102,9 +102,6 @@ sub process # uncoverable branch false - reacquire the lock since it was released by the client process above if (lockAcquire(cfgCommandName(cfgCommandGet()), false)) { - # Open the log file - logFileSet(storageLocal(), cfgOption(CFGOPT_LOG_PATH) . '/' . cfgOption(CFGOPT_STANZA) . '-archive-async'); - # uncoverable branch true - chdir to / chdir '/' or confess &log(ERROR, "unable to chdir to /: $OS_ERROR", ERROR_PATH_MISSING); @@ -123,6 +120,9 @@ sub process setsid() or confess &log(ERROR, "unable to create new session group: $OS_ERROR", ERROR_ASSERT); + # Open the log file + logFileSet(storageLocal(), cfgOption(CFGOPT_LOG_PATH) . '/' . cfgOption(CFGOPT_STANZA) . '-archive-async'); + # Start processing $self->processServer(); }